Skip to main content

Variable: Calendar

@arolariu/components


@arolariu/components / Calendar

Variable: Calendar

const Calendar: ForwardRefExoticComponent<CalendarProps & RefAttributes<HTMLDivElement>>

Defined in: components/ui/calendar.tsx:62

Renders a styled calendar built on top of react-day-picker.

Remarks

  • Renders the DayPicker calendar root
  • Built on react-day-picker with shared button styling from the component library
  • Preserves the V1 public API while aligning visuals with the current design system
  • Overrides the default DayPicker Root, Chevron, DayButton, and WeekNumber components while still allowing consumers to replace them through the components prop
  • Override the default chevron icons with components={{Chevron: YourChevronComponent}}

Example

<Calendar
mode='single'
selected={new Date()}
onSelect={(date) => console.log(date)}
/>

See

React Day Picker Docs

// was this page useful?