Calendar
A month grid; powers DatePicker and DateRangePicker. English and Monday-first unless locale is given.
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
A month grid; powers DatePicker and DateRangePicker.
Accessibility
Keyboard-navigable grid (arrow keys move days, PageUp/PageDown move months). The selected date is announced; the field has a clear label.
Install and import
npx shadcn@latest add @prism/calendar
import { Calendar } from '@/components/prism/Calendar';
In a no-build prototype, read it from the bundle instead: const { Calendar } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
mode | "single" | "range" | — | |
value | Date | \{ start: Date; end: Date | null \} | — | |
onSelect | (date: Date) => void | — | |
minDate | Date | — | |
maxDate | Date | — | |
months | number | — | Number of side-by-side month panels. Default 1. |
showMonthYearPicker | boolean | — | Month and year selects in the header (single panel), for dates far from today. |
defaultFocusedValue | Date | — | The month to open on when there's no value (e.g. new Date(2008, 0, 1) for a birth date). |
locale | string | — | BCP 47 locale for month and weekday names, and for which day the week starts on. Omit it for the fixed defaults: English names, Monday first. |
weekStartsOn | 0 | 1 | 2 | 3 | 4 | 5 | 6 | — | First day of the week, 0 (Sunday) to 6 (Saturday). Overrides the locale's own. |