Calendar
An inline month grid for selecting dates. Built on react-day-picker (DayPicker) — every day-picker prop passes straight through, so consult its docs for the full surface. We layer on the design-system styling, swap in our Button for day cells (CalendarDayButton) and nav, and wire up our lucide chevrons.
Calendar is the raw grid. For the common “click a field, pop a calendar” pattern, reach for DatePicker instead — it wraps this component in a Popover with a formatted trigger button. Use Calendar directly when you need the grid always visible, multi-month layouts, or modes beyond single-date.
Selection is uncontrolled-friendly but normally driven by state: hold the value yourself and pass selected + onSelect. The shape of selected follows mode — a Date for single, a DateRange for range, a Date[] for multiple.
Single date
mode="single" selects one day. selected is a Date | undefined; onSelect hands back the clicked day (or undefined when the selected day is clicked again).
6/30/2026
Date range
mode="range" selects a contiguous span. selected is a DateRange ({ from, to }) imported from react-day-picker. The first click sets from; the next sets to and fills the days between with the range styling.
6/30/2026 – 7/5/2026
Multiple days
mode="multiple" toggles individual, non-contiguous days. selected is a Date[]; clicking a selected day removes it.
1 day selected
Multiple months
numberOfMonths renders that many months side by side — handy for range selection where the span crosses a month boundary.
Disabling days
disabled takes a react-day-picker Matcher (or array of matchers) — a Date, a { from, to } range, a { before } / { after } bound, day-of-week, or a predicate. Disabled days can’t be selected and render muted.
Pick any day from today forward
Reference
Calendar
Wraps react-day-picker DayPicker — it extends React.ComponentProps<typeof DayPicker>, so any day-picker prop (mode, selected, onSelect, numberOfMonths, disabled, month, defaultMonth, weekStartsOn, fromDate/toDate, fixedWeeks, locale, …) passes through. Only the additions and overridden defaults are listed below.
| Prop | Type | Default | Description |
|---|---|---|---|
mode | "single" | "range" | "multiple" | — | Selection behaviour; determines the shape of selected / onSelect |
selected | Date | DateRange | Date[] | — | Current selection — typed to match mode |
onSelect | (value) => void | — | Fires on selection change with the new value (shape matches mode) |
numberOfMonths | number | 1 | How many months to render side by side |
disabled | Matcher | Matcher[] | — | Days that can’t be selected (date, range, { before }, predicate, …) |
showOutsideDays | boolean | true | Render trailing/leading days from adjacent months |
captionLayout | "label" | "dropdown" | "dropdown-months" | "dropdown-years" | "label" | Month/year header as a static label or selectable dropdowns |
buttonVariant | Button["variant"] | "ghost" | Button variant used for the prev/next month nav buttons |
className | string | — | Merged onto the root |
classNames | Partial<Record<keyof DayPicker classNames, string>> | — | Per-slot class overrides, merged onto the defaults |
components | Partial<DayPicker components> | — | Override individual day-picker render slots |
CalendarDayButton
The render component for a single day cell — passed to DayPicker as the DayButton slot, so you rarely use it directly. Renders our Button (variant="ghost", size="icon") and reflects react-day-picker’s day modifiers onto data-* attributes (data-selected-single, data-range-start, data-range-end, data-range-middle, data-today) that drive the selection styling. Auto-focuses when the day carries the focused modifier. Extends react-day-picker’s DayButton props.
| Prop | Type | Default | Description |
|---|---|---|---|
day | CalendarDay | — | The day-picker day object (provides day.date) |
modifiers | Modifiers | — | Active modifiers for the day (selected, range_*, today, focused) |
className | string | — | Merged onto the day Button |