Haedong
027

Date Picker

Form

No date

Customize

Range
Field
Disabled

Code

<Field label="Due" description="Deadline for the draft">
  <DatePicker
    value={date}
    onValueChange={setDate}
  />
</Field>

Install

npx shadcn@latest add https://components.haedong.dev/r/date-picker.json

Props

Single date. Calendar's minDate / maxDate / disabledDates / weekStartsOn pass through. Label it with aria-label / aria-labelledby or wrap it in Field.

PropTypeDescription
value / defaultValueDatePicked date (controlled / uncontrolled).
onValueChange(value: Date | undefined) => voidCalled when a day is picked (the popover then closes) or the pick is cleared.
placeholderstringMuted uppercase when nothing is picked. Defaults to "Pick a date".
format(date: Date) => stringHow the date reads in the trigger. Defaults to "Sep 9, 2026".
namestringRenders a hidden input with the date as yyyy-mm-dd.
disabledbooleanDims the trigger to 40% and drops pointer events.