ComponentClient component
Date Picker
A controlled date field composed from Calendar, Popover and Button.
Installation
Preview
Usage
tsx
import { DatePicker } from "@/components/ui/date-picker"
<DatePicker
value={date}
onValueChange={setDate}
clearable
/>API reference
| Prop | Type | Default | Description |
|---|---|---|---|
value | Date | undefined | — | Controlled selected date. |
onValueChange | (date?: Date) => void | — | Runs when the date changes. |
locale | string | "en-US" | BCP 47 locale used to format the trigger label. |
clearable | boolean | false | Displays an inline clear action. |