Calendar
Browse dates in a clear, compact month view.
Choose a date without losing context.
npx shadcn@latest add @silicon-ui/date-pickernpx shadcn@latest add @silicon-ui/date-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-picker/date-picker.tsxcomponents/silicon-ui/date-picker/date-picker.module.csscomponents/silicon-ui/calendar/calendar.tsx sharedcomponents/silicon-ui/lib/use-today.ts sharedcomponents/silicon-ui/calendar/calendar.module.css sharedInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
label* | string | — |
value | Date | — |
onChange | (date: Date | undefined) => void | — |
description | string | — |
placeholder | string | "Select a date" |
minDate | Date | — |
maxDate | Date | — |
disabledDates | CalendarDateMatcher | — |
locale | string | "en-US" |
format | Intl.DateTimeFormatOptions | { month: "short", day: "numeric", year: "numeric" } |
showTodayAdds a Today button to the calendar header. | boolean | — |
Also accepts the props of ButtonHTMLAttributes<HTMLButtonElement>, except value, onChange.