Calendar
Browse dates in a clear, compact month view.
A range picker that grows from its trigger into two months with presets and a stretching range highlight.
npx shadcn@latest add @silicon-ui/date-range-pickernpx shadcn@latest add @silicon-ui/date-range-pickerInstall the dependencies.
npm install lucide-react motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/date-range-picker/date-range-picker.tsxcomponents/silicon-ui/lib/use-today.ts sharedcomponents/silicon-ui/date-range-picker/date-range-picker.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
valueControlled value. Pass `null` for no selection. | DateRange | null | — |
defaultValueUncontrolled starting value. | DateRange | null | null |
onChangeCalled with the applied range. | (range: DateRange) => void | — |
labelAccessible name of the trigger and the dialog. Defaults to "Date range". | string | "Date range" |
placeholder | string | "Select dates" |
presets | DateRangePreset[] | defaultDateRangePresets |
minDate | Date | — |
maxDate | Date | — |
weekStartsOn0 is Sunday, 1 is Monday. Defaults to 0. | 0 | 1
| 0 |
locale | string | "en-US" |
monthsForce one or two months. `auto` picks two when the boundary is wide enough. | "auto" | 1 | 2 | "auto" |
boundaryThe element the panel should stay inside. Defaults to the viewport. | () => HTMLElement | null | — |
className | string | — |