Calendar
A calendar component for selecting dates and date ranges.
Usage
The Calendar components provide flexible date selection functionality with support for single dates, date ranges, and custom triggers.
Calendar Props
Prop | Type | Default |
---|---|---|
numberOfMonths | number | - |
captionLayout | string | - |
loadingData | boolean | - |
dateInfo | Record<string, unknown> | - |
showOutsideDays | boolean | - |
className | string | - |
Range Picker Props
Prop | Type | Default |
---|---|---|
dateFormat | string | - |
onSelect | (range: { start: Date; end: Date; }) => void | - |
value | { start: Date; end: Date; } | - |
calendarProps | CalendarProps | - |
inputFieldsProps | InputFieldProps | - |
children | ReactNode | - |
showCalendarIcon | boolean | true |
Date Picker Props
Prop | Type | Default |
---|---|---|
textFieldProps | Record<string, unknown> | - |
children | ReactNode | - |
showCalendarIcon | boolean | true |
Examples
Calendar
Choose between different variants to convey different meanings or importance levels. Default variant is accent
.
Range Picker
The Range Picker component allows selecting a date range with the following behaviors:
-
When selecting two different dates:
- The UI will show the exact selected dates
- The callback will return the start date as selected and end date as one day after
-
When clicking the same date twice:
- The UI will show the same date for both start and end
- The callback will return the start date as selected and end date as one day after
Date Picker
Badges can include an icon to provide additional visual context. By default there is no icon.