enes

Date Picker

Documentation for DatePicker soon.

Usage

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

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

<DatePicker bind:value />

Date Format

Use the format prop to switch between dd/MM/yyyy and MM/dd/yyyy.

Hiding Columns

Use hideDays, hideMonths, or hideYears to hide individual selector columns (for example, a month/year-only picker).

Component Props

NameTypeDescription
valuebindable stringSelected date as YYYY-MM-DD (matches the underlying <input type="date">).
format'MM/dd/yyyy' \| 'dd/MM/yyyy'The display format of the date. Default: 'dd/MM/yyyy'.
openbindable booleanWhether the picker flyout is open.
hideYearsbooleanHide the year selector column.
hideMonthsbooleanHide the month selector column.
hideDaysbooleanHide the day selector column.
minYearnumberEarliest selectable year. Default: current year − 100.
maxYearnumberLatest selectable year. Default: current year.
disabledDatesDate[]Specific days (year-month-day) that cannot be selected.
disabledMonthsDate[]Specific months (by month + year) that cannot be selected.
disabledYearsDate[]Specific years (by year) that cannot be selected.
elementbindable HTMLElementThe DOM reference of the date picker root element.
inputElementbindable HTMLInputElementThe DOM reference of the underlying input element.