The Calendar component provides flexible date selection interfaces. It includes Calendar for inline display, DatePicker for single date selection, and RangePicker for selecting date ranges.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/raystack/apsara/llms.txt
Use this file to discover all available pages before exploring further.
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
The selection mode of the calendar.
The selected date(s). Type depends on mode.
Callback fired when a date is selected.
The month to display.
Callback fired when the month changes.
The earliest month that can be displayed.
The latest month that can be displayed.
Dates to disable. Can be a boolean, specific dates, or a function.
Whether to show days outside the current month.
Whether to show tooltips on date hover.
Tooltip messages for specific dates. Keys should be in ‘dd-MM-yyyy’ format.
Additional info to display on dates. Can be an object or function.
Whether the calendar is in a loading state.
The timezone to use for date calculations.
Number of months to display.
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
The selected date value.
Callback fired when a date is selected.
The format for displaying the date in the input field.
Props to pass to the underlying InputField component.
Props to pass to the underlying Calendar component.
Whether to show the calendar icon in the input field.
The timezone to use for date calculations.
Props to pass to the Popover.Content component.
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
The selected date range value with
from and to properties.The default date range for uncontrolled usage.
Callback fired when a date range is selected.
The format for displaying dates in the input fields.
Props for the start and end date input fields.
Props to pass to the underlying Calendar component.
Whether to show calendar icons in the input fields.
CSS class for the container wrapping both input fields.
Footer content to display below the calendar.
The timezone to use for date calculations.
Props to pass to the Popover.Content component.
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.