Forms
Calendar
Renders accessible single and range date selection with month navigation, disabled bounds, and locale-aware formatting.
idle
Usage
Examples
Single date
Date range
Recommendations
| Guidance | Practice |
|---|---|
| Do | Specify locale and unavailable dates. Use range mode when the task selects a stay or reporting interval. |
| Do | Use minValue, maxValue, or isDateUnavailable for real date constraints. |
Usage boundaries
| Guidance | Boundary |
|---|---|
| Scope | Use Date Picker for compact editable entry. Date availability and booking rules belong to the application. |
API reference
Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Selection mode for the calendar: single date selection or range selection. |
| | — | Controlled selection value: Date for single mode or CalendarRangeValue for range mode. |
| | — | Initial selection value in uncontrolled mode: Date for single mode or CalendarRangeValue for range mode. |
| | — | Event handler called when date selection changes with the selected Date or CalendarRangeValue. |
| | — | Controlled month currently displayed in the calendar. |
| | Current month or month of initial value | Initial month displayed when uncontrolled. |
| | — | Event handler called when the displayed month changes. |
| | — | Locale object used for formatting months, weekdays, and accessible labels. |
| | "ltr" | Text and layout direction for the calendar grid and navigation. |
| | 0 (Sunday) | First day of the week, where 0 is Sunday and 1 is Monday. |
| | false | Automatically focuses the selected or initial day button on mount. |
| | false | Prevents deselecting the current value when clicked. |
| | false | Disables all date selection and month navigation controls. |
| | false | Prevents selection changes while preserving focus and keyboard navigation. |
| | false | Renders invalid accessibility semantics and styling on the calendar root. |
| | — | Earliest selectable date. Dates before this are disabled. |
| | — | Latest selectable date. Dates after this are disabled. |
| | — | Predicate function returning true for specific disabled dates. |
| | — | Minimum number of nights required for a completed range in range mode. |
| | — | Maximum number of nights permitted for a completed range in range mode. |
| | "div" | Root calendar component container with owned layout and navigation slots. |
| | — | Range selection object with a required start date and optional end date. |
| | "label" | Use dropdown to navigate directly with month and year selects. |
| | 100 years before today in dropdown mode | First month available for navigation. Does not change date availability. |
| | End of the current year in dropdown mode | Last month available for navigation. Does not change date availability. |