Forms
Date range picker
Combines an editable ISO date-range input with a calendar popover, optional presets, and range constraints.
Usage
Examples
Default range
Controlled with presets
Disabled
Read-only
Native form
Recommendations
| Guidance | Practice |
|---|---|
| Do | Explain the range's meaning and any stay limits. Use presets only for intervals relevant to the task. |
Usage boundaries
| Guidance | Boundary |
|---|---|
| Scope | Define endpoint and timezone meaning in the application. Presets do not replace server validation. |
| Scope | A first calendar click may be a pending start; a complete range has both endpoints. |
API reference
Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Controlled selected date range with a required start and optional end. |
| | — | Initial selected range for uncontrolled operation. |
| | — | Called when the selected date range changes. |
| | false | Prevents interaction with the input, calendar, and presets. |
| | false | Allows inspection without committing a changed range. |
| | false | Marks the input invalid. |
| | false | Requires a range before form submission. |
| | "default" | Visual size of the input field. |
| | — | Earliest selectable date. |
| | — | Latest selectable date. |
| | 0 | Minimum number of nights in a completed range. |
| | — | Maximum number of nights in a completed range. |
| | — | Predicate that marks dates unavailable for selection. |
| | — | Optional quick-select ranges shown above the calendar. |
| | — | Locale configuration for calendar labels and formatting. |
| | — | Text and calendar direction. |
| | — | First day of the week, from Sunday (0) to Saturday (6). |
| | — | HTML form field name. |
| | — | HTML element identifier. |
| | — | Accessible name when no visible label is present. |
| | — | ID of the element labelling the input. |
| | — | ID of the element describing the input. |
| | false | Automatically focuses the text input on mount. |
| | — | Composite date-range input with calendar and optional presets. |
| | "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. |