DatePicker
An inline calendar, one month at a time, for choosing a day, with limits, days that cannot be chosen, and names from the locale.
Stability: experimental
Props
| Prop | Type | Default | Means |
|---|---|---|---|
label | string | The label above the month, and with the month the grid's accessible name. | |
value | string | bindable("") | The chosen day as an ISO date, such as "2026-11-14", or "" for none. Bind it with bind:value={name}. |
min | string | The first day that can be chosen, as an ISO date. | |
max | string | The last day that can be chosen, as an ISO date. | |
disabledDates | string[] | ((date: string) => boolean) | Days that cannot be chosen: a list of ISO dates, or a function given each ISO date. | |
locale | string | The locale for the month and weekday names, the full date each day is read as, and the first day of the week; the device's when left out. | |
disabled | boolean | false | No day can be chosen or focused. |
States
| State | Looks like |
|---|---|
chosen | A primary-filled circle with on-primary text. |
today | A thin primary ring and primary text; aria-current="date". |
unavailable | Muted, 40% opacity and struck through; it cannot be pressed. |
focused | The focus outline on the day that holds the Tab stop. |
disabled | The whole part at 50% opacity. |
Accessibility
| role | grid named "<label>, <month and year>", with rows, column headers named by the full weekday, and each day a gridcell button with aria-selected |
| name | Each day by its full date in the locale, such as "Thursday, 12 November 2026". |
| focus | One Tab stop for the grid, on the focused day: the chosen day, else today, kept within min and max. It is never a day that cannot be chosen: opening, a new value and the month buttons move it to the nearest day of the month that can be, and when none can, to the month's first that can. The previous and next month buttons come before it. |
| keyboard | ArrowLeft and ArrowRight move a day, ArrowUp and ArrowDown a week, Home and End to the start and end of the week, PageUp and PageDown a month (to the same day, or the month's last). Days that cannot be chosen are passed over in the direction of travel; movement past min or max stays put. Enter or Space chooses the focused day. |
| notes | The first day of the week comes from Intl.Locale's week information, Monday where it is unknown. |
Theme tokens
color.ink color.muted color.raised color.primary color.on-primary space.1 space.2 radius.full text.caption text.heading text.body
Example
<DatePicker label="Check-in" min={today} bind:value={checkIn} />