Date and time
DatePicker
Stored as an ISO string
Value: 2026-03-12
Weekdays in March 2026 only
Shown as: nothing picked
When to use
- A form needs a single day with a compact trigger and a calendar.
- Your API, URL or state already uses ISO strings.
When not to use
- For custom placement of the grid, use
Calendar. - For date and time together, use
DateTimePicker; for a range, useDateRangePicker.
Minimal example
<DatePicker value={publishDate} onChange={setPublishDate} minValue="2026-03-09" />Public API
value?: string | null;onChange(date: string)receives an ISO string after the user picks a date.minValue,maxValue,isDateUnavailablelimit the choice in the calendar; this is a UI boundary and does not replace server-side validation.minValueandmaxValueare ISO stringsYYYY-MM-DD, likevalue(minValue="2026-03-09"); there is no need to import@internationalized/date(the package itself comes with the kit). An@internationalized/dateobject is still accepted. An unparsable string is treated as an unset bound.isDateUnavailablereceives a calendar object:date.toString()returns the day as aYYYY-MM-DDstring.- In
DateTimePickerthese bounds are calendar bounds, that is, day bounds: see DateTimePicker for details. placeholder,disabled,locale,triggerClassNameconfigure the control.formatDate(isoDate, locale?)is a public utility for displaying an ISO calendar date the same safe way; do not usenew Date("YYYY-MM-DD")unless the date is a UTC instant.
Accessibility and keyboard
- The
FormFieldhint and error are announced together with the field. The description is passed through context, andaria-describedbyis set on the trigger; the consumer'saria-describedbyvalue is not overridden but merged with it. Before version 3.0.0 the react-aria component families did not pick up the form description — it was on screen but never reached the screen reader (ADR-0031). - The popover uses
Calendarwith its grid and keyboard contract; it closes on selection. - Associate an external label through
FormFieldandhtmlForonly when the trigger is bound to it in your composition; do not rely on the placeholder. - See
src/components/date-time/DatePicker.tsx,src/components/date-time/DatePicker.stories.tsx,tests/matrix.tsx.
TypeScript types
DatePickerProps
Prop
Type