Duolith docs

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

PropTypeDefaultMeans
labelstringThe label above the month, and with the month the grid's accessible name.
valuestringbindable("")The chosen day as an ISO date, such as "2026-11-14", or "" for none. Bind it with bind:value={name}.
minstringThe first day that can be chosen, as an ISO date.
maxstringThe last day that can be chosen, as an ISO date.
disabledDatesstring[] | ((date: string) => boolean)Days that cannot be chosen: a list of ISO dates, or a function given each ISO date.
localestringThe 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.
disabledbooleanfalseNo day can be chosen or focused.

States

StateLooks like
chosenA primary-filled circle with on-primary text.
todayA thin primary ring and primary text; aria-current="date".
unavailableMuted, 40% opacity and struck through; it cannot be pressed.
focusedThe focus outline on the day that holds the Tab stop.
disabledThe whole part at 50% opacity.

Accessibility

rolegrid named "<label>, <month and year>", with rows, column headers named by the full weekday, and each day a gridcell button with aria-selected
nameEach day by its full date in the locale, such as "Thursday, 12 November 2026".
focusOne 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.
keyboardArrowLeft 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.
notesThe 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} />