Date Picker

Single day and range calendars in a popover, with locale-aware month titles and week start.

Also known as: calendar, date range, range picker

Installation

Install with the CLI, or copy the component source into your project.

Add date-picker (npm)

npx --yes -p @default-file/ui df-ui add date-picker

Default

Single day field with a fixed ISO value. The calendar opens from the trigger.

Single day calendar

Open calendar for one day. The selected day is 12 March 2026. The week starts on Sunday in en-US.

Range calendar

DateRangePicker with a start and end day. The selected span is 9 to 20 March 2026.

Locale

de-DE locale. The month title is German. The week starts on Monday.

Min, max, and disabled days

min and max keep selection inside March 2026. Weekends are disabled.

Disabled

Disabled trigger with a committed day.

Placeholder

Empty single and range fields with custom placeholder copy.

Properties

Single-day DatePicker and range DateRangePicker. Both open a locale-aware calendar in a popover.

Shared props

Available on DatePicker and DateRangePicker.

PropTypeDefaultNotes
localestring"en-US"BCP 47 locale for the month title and the first day of the week.
minstring | null-Earliest selectable ISO day.
maxstring | null-Latest selectable ISO day.
disabledDates(dayIso: string) => boolean-Return true to disable a specific day.
placeholderstring-Trigger field placeholder when empty.
openboolean-Controlled open state for the calendar popover.
defaultOpenboolean-Uncontrolled initial open state.
onOpenChange(open: boolean) => void-Called when the popover open state changes.
disabledboolean-Disable the trigger and calendar.
idstring-Id forwarded to the trigger input.
aria-labelstring-Accessible name for the trigger when no external label is used.
classNamestring-Additional styles on the root.

DatePicker

PropTypeDefaultNotes
valuestring | null-Controlled ISO day value.
defaultValuestring | null-Uncontrolled initial ISO day.
onChange(value: string | null) => void-Called when the selected day changes.

DateRangePicker

PropTypeDefaultNotes
valueDateRangeValue | null-Controlled { start, end } ISO day range.
defaultValueDateRangeValue | null-Uncontrolled initial range.
onChange(value: DateRangeValue | null) => void-Called when the range changes.