enes

Calendar Date Picker

Documentation for Calendar Date Picker coming soon.

Usage

<script>
	import { CalendarDatePicker } from 'fluentui-svelte';

	let value = $state(null);
</script>

<CalendarDatePicker bind:value />

Component API

The CalendarDatePicker combines a button trigger with a CalendarView popup. Clicking the trigger opens the calendar, and selecting a day updates the bound value and closes the popup. Because it builds on CalendarView, calendar props such as blackoutDates, minDate, maxDate, weekStart and headers are forwarded straight to the popup calendar. You can see the full list in the Component Props table below.

Selecting a Date

Bind a variable to the value prop to read the selected date. The value updates when the user picks a day and the popup closes.

Component Props

NameTypeDescription
valuebindable Date \| nullThe selected date. Bind to it to read or set the current selection.
localestringLocale used to format the displayed date. Default: 'en-US'.
formatIntl.DateTimeFormatOptionsFormatting options for the displayed date. Default: numeric year, month and day.
calendarPositionobjectPositioning configuration forwarded to the calendar popup.
blackoutDatesDate[]Dates that cannot be selected. Forwarded to the underlying CalendarView.
minDateDateEarliest selectable date. Forwarded to the underlying CalendarView.
maxDateDateLatest selectable date. Forwarded to the underlying CalendarView.
weekStartnumberThe first day of the week. Forwarded to the underlying CalendarView.
headersobjectHeader configuration forwarded to the underlying CalendarView.
onChange(value: Date) => voidCallback fired when the selected date changes.
elementbindable HTMLDivElementThe DOM reference of the calendar date picker root element.