Calendar
Storybook
Go to StoryCalendarProps
type CalendarProps = DayPickerProps & object;
Defined in: packages/design-system/src/components/Calendar/Calendar.tsx:63
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 | packages/design-system/src/components/Calendar/Calendar.tsx:71 |
Calendar()
function Calendar(props): Element;
Defined in: packages/design-system/src/components/Calendar/Calendar.tsx:99
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
/>