Vesyl UI

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).

June 2026

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.

June 2026
July 2026

6/30/20267/5/2026

Multiple days

mode="multiple" toggles individual, non-contiguous days. selected is a Date[]; clicking a selected day removes it.

June 2026

1 day selected

Multiple months

numberOfMonths renders that many months side by side — handy for range selection where the span crosses a month boundary.

June 2026
July 2026

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.

June 2026

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.

PropTypeDefaultDescription
mode"single" | "range" | "multiple"Selection behaviour; determines the shape of selected / onSelect
selectedDate | DateRange | Date[]Current selection — typed to match mode
onSelect(value) => voidFires on selection change with the new value (shape matches mode)
numberOfMonthsnumber1How many months to render side by side
disabledMatcher | Matcher[]Days that can’t be selected (date, range, { before }, predicate, …)
showOutsideDaysbooleantrueRender trailing/leading days from adjacent months
captionLayout"label" | "dropdown" | "dropdown-months" | "dropdown-years""label"Month/year header as a static label or selectable dropdowns
buttonVariantButton["variant"]"ghost"Button variant used for the prev/next month nav buttons
classNamestringMerged onto the root
classNamesPartial<Record<keyof DayPicker classNames, string>>Per-slot class overrides, merged onto the defaults
componentsPartial<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.

PropTypeDefaultDescription
dayCalendarDayThe day-picker day object (provides day.date)
modifiersModifiersActive modifiers for the day (selected, range_*, today, focused)
classNamestringMerged onto the day Button