components

DatePicker

A trigger button that opens a Calendar in a popover. Same value/defaultValue/onChange shape as Calendar itself — picking a date closes the popover.

tsx
<DatePicker label="Due date" />
label

DatePicker vs. Calendar

Reach for Calendar when the grid should stay visible — a scheduling view, a form where the date is the main thing being edited. DatePicker fits it into a normal field-sized form row instead, the way Combobox fits a long option list into a single input.

Examples

Uncontrolled, with a starting value:

tsx
<DatePicker label="Due date" defaultValue={new Date(2026, 7, 15)} />

minDate/maxDate pass straight through to the inner Calendar:

tsx
<DatePicker
  label="Delivery date"
  minDate={new Date(2026, 7, 1)}
  maxDate={new Date(2026, 7, 31)}
/>

Props

PropTypeDefaultDescription
classNametext——
defaultValuereadonly——
descriptiontext——
disabledboolean——
errortext——
formatDatereadonly`Intl.DateTimeFormat` with `dateStyle: "medium"`Overrides the trigger's date formatting.
labeltext——
maxDatereadonly——
minDatereadonly——
onChangereadonly——
placeholdertext"Pick a date"—
successtext——
valuereadonly——
weekStartsOnreadonly0 (Sunday)—