Skip to main content

Calendar

Storybook

Go to Story

CalendarProps

type CalendarProps = DayPickerProps & object;

Defined in: src/components/Calendar/Calendar.tsx:57

Type Declaration

NameTypeDescriptionDefined in
showTimePicker?booleanWhether to show the time picker below the calendar. Only works in single date selection mode. When enabled, selected time will be preserved when changing dates. Default falsesrc/components/Calendar/Calendar.tsx:65

Calendar()

function Calendar(props): Element;

Defined in: src/components/Calendar/Calendar.tsx:93

A calendar component for date selection with an optional time picker. Built on top of react-day-picker.

Parameters

ParameterType
propsCalendarProps

Returns

Element

Examples

// Basic usage with single date selection
<Calendar
mode="single"
selected={date}
onSelect={setDate}
/>
// With time picker
<Calendar
mode="single"
selected={date}
onSelect={setDate}
showTimePicker
/>