Overview
Pick a date
April 2026
For date range selection, use
DateRangePicker. Both components share the same API shape — DateRangePicker accepts { from: Date; to?: Date } for its value prop.Installation
Usage
Variants
Single Date (Default)
The default trigger opens a calendar popover for single date selection.Pick a date
With Selected Value
April 1, 2026
Date Range Picker
Apr 1, 2026 – Apr 15, 2026
Error State
Pick a date
Please select a valid dateDisabled
Pick a date
API Reference
DatePicker
Controlled selected date.
Callback fired when the selected date changes.
Uncontrolled default selected date.
Label displayed above the trigger input.
Trigger placeholder text shown when no date is selected.
Date format string (date-fns format). E.g.
"dd/MM/yyyy", "MMM d, yyyy".Earliest selectable date. Dates before this are disabled in the calendar.
Latest selectable date. Dates after this are disabled in the calendar.
Disables the picker entirely — trigger cannot be opened.
Helper or error message displayed below the trigger.
Validation state. Values:
default · errorAdditional Tailwind classes for the trigger container.
DateRangePicker
Same props asDatePicker, except:
Controlled selected date range.
Callback fired when the selected range changes.
Accessibility
- The trigger renders as a
<button>witharia-haspopup="dialog"andaria-expanded - The calendar popover uses
role="dialog"witharia-modal="true" - Individual day cells use
role="gridcell"witharia-selectedandaria-disabled - Keyboard navigation: Arrow keys move focus between days, Enter/Space selects, Escape closes the popover
- The calendar
<table>hasrole="grid"with column headers labeled by weekday abbreviation
Do’s & Don’ts
Do
- Use
minDateandmaxDateto constrain valid selections - Show the selected date in a human-readable format (
"April 1, 2026", not"2026-04-01") - Provide a
helperTextwith error state to explain what went wrong - Use
DateRangePickerfor date range inputs — never two separate DatePickers
Don't
- Don’t use DatePicker for time-only selection — use a time input
- Don’t disable today’s date unless there’s a valid business reason
- Don’t rely solely on the calendar for date entry — allow manual text input where possible
- Don’t use DatePicker inline in dense form rows — it opens a popover that needs space