Calendar
Storybook
Go to StoryCalendarProps
type CalendarProps = DayPickerProps & object;
Defined in: src/components/Calendar/Calendar.tsx:57
Type Declaration
| Name | Type | Description | Defined in |
|---|---|---|---|
showTimePicker? | boolean | Whether 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 false | src/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
| Parameter | Type |
|---|---|
props | CalendarProps |
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
/>