fndn/ui

Components

Date Picker

Beta

A date field that opens a calendar, for one date, several dates or a range.

Details

A date field with a calendar in a popup. The field reads as words in the locale: a date ("Mar 10, 2025") or a range as one phrase ("Mar 10 โ€“ 28, 2025", "Mar 28 โ€“ Apr 2, 2025", "Dec 30, 2025 โ€“ Jan 2, 2026"), with the calendar icon at its start. A press anywhere on the field opens the calendar and leaves the caret in the text, so a date can still be typed: the shown text, the locale's numeric date, ISO, month names, a range with a dash or "to"; it is read on Enter and when focus leaves. The calendar is the shared popup with the calendar's views (days, months, years); it grows out of the field from the pointer and is instant from the keyboard. Choosing a date writes it and closes the popup. Single dates, several dates or a range, min / max, unavailable days, week start and locale. Behaviour, focus and ARIA come from the Zag date-picker machine, through Ark UI; the text is the component's own (helper `date-text.ts`).

Behaviour from Ark UI, the date-picker machine of Zag.