Components
The calendar module exports three main components:- Calendar: Base calendar component for inline date display and selection
- DatePicker: Input field with popover calendar for single date selection
- RangePicker: Input fields with popover calendar for date range selection
Calendar
The base Calendar component displays a calendar interface for date selection.Basic usage
Props
'single' | 'multiple' | 'range'
default:"'single'"
The selection mode of the calendar.
Date | Date[] | DateRange
The selected date(s). Type depends on mode.
(date: Date | Date[] | DateRange) => void
Callback fired when a date is selected.
Date
The month to display.
(month: Date) => void
Callback fired when the month changes.
Date
The earliest month that can be displayed.
Date
The latest month that can be displayed.
boolean | Date | Date[] | ((date: Date) => boolean)
Dates to disable. Can be a boolean, specific dates, or a function.
boolean
default:"true"
Whether to show days outside the current month.
boolean
default:"false"
Whether to show tooltips on date hover.
Record<string, ReactNode>
default:"{}"
Tooltip messages for specific dates. Keys should be in ‘dd-MM-yyyy’ format.
Record<string, ReactNode> | ((date: Date) => ReactNode | null)
default:"{}"
Additional info to display on dates. Can be an object or function.
boolean
default:"false"
Whether the calendar is in a loading state.
string
The timezone to use for date calculations.
number
Number of months to display.
string
Additional CSS classes to apply to the calendar.
Single date selection
With tooltips and date info
DatePicker
A date picker with an input field that opens a calendar popover.Basic usage
Props
Date
default:"new Date()"
The selected date value.
(date: Date) => void
Callback fired when a date is selected.
string
default:"'DD/MM/YYYY'"
The format for displaying the date in the input field.
InputFieldProps
Props to pass to the underlying InputField component.
CalendarProps
Props to pass to the underlying Calendar component.
boolean
default:"true"
Whether to show the calendar icon in the input field.
string
The timezone to use for date calculations.
PopoverContentProps
Props to pass to the Popover.Content component.
ReactNode | ((props: { selectedDate: string }) => ReactNode)
Custom trigger element or render function.
Controlled date picker
Custom date format
With date restrictions
Custom trigger
RangePicker
A date range picker with two input fields for start and end dates.Basic usage
Props
DateRange
The selected date range value with
from and to properties.DateRange
default:"{ from: new Date(), to: new Date() }"
The default date range for uncontrolled usage.
(range: DateRange) => void
Callback fired when a date range is selected.
string
default:"'DD/MM/YYYY'"
The format for displaying dates in the input fields.
{ startDate?: InputFieldProps; endDate?: InputFieldProps }
Props for the start and end date input fields.
CalendarProps
Props to pass to the underlying Calendar component.
boolean
default:"true"
Whether to show calendar icons in the input fields.
string
CSS class for the container wrapping both input fields.
Footer content to display below the calendar.
string
The timezone to use for date calculations.
PopoverContentProps
Props to pass to the Popover.Content component.
ReactNode | ((props: { startDate: string; endDate: string }) => ReactNode)
Custom trigger element or render function.
Controlled range picker
With footer
Custom date format
Preset ranges example
Accessibility
- All calendar components support full keyboard navigation.
- Arrow keys navigate between dates, Enter/Space to select.
- Month and year dropdowns are keyboard accessible.
- Proper ARIA labels are applied to navigation buttons.
- Screen readers announce selected dates and date ranges.
- The DatePicker input field supports manual date entry with validation.
- Focus management ensures smooth interaction between input and calendar.