The DateRangeInput component provides a user-friendly interface for selecting date ranges. It combines two input fields with a dropdown calendar interface, allowing users to easily select start and end dates.
size="xxs" draws both halves at 32px, the height of a size="s" Button, rounded at radius-m on their outer corners.
value may leave out either end, so {} is no range and { startDate } is a range still being picked. onChange always hands back both keys, undefined where nothing is picked yet.
- Dual Input Fields: Separate fields for start and end dates
- Calendar Interface: Visual calendar for intuitive date range selection
- Formatted Display: Displays selected dates in a readable format
- Custom Labels: Configurable labels for start and end date fields
- Dropdown Integration: Uses DropdownWrapper for a clean UI experience
- Clear visual indication of selected date range
- Keyboard navigation support for calendar interface
- Proper labeling for screen readers
- Each field has an id of its own, {id}-start and {id}-end, so a page never holds the same id twice