Date Picker
A popover-based date picker composing Popover and Calendar for single, multiple, and range date selection.
Base Date Picker combines Popover and Calendar into a single date selection control supporting single, multiple, and range modes. Open state, selected value, and visible month each retain independent controlled/uncontrolled boundaries.
Preview
Section titled “Preview” Web Components React Vue Vue 2
Loading interactive preview… The article and source are ready to read. Interactive controls will appear here when ready.
Range and multiple date selection:
Web Components React Vue Vue 2
Loading interactive preview… The article and source are ready to read. Interactive controls will appear here when ready.
Installation
Section titled “Installation”Available starting in 0.3.0-rc.1 and later releases.
Single, range, and multiple selection
Section titled “Single, range, and multiple selection”- Single mode: requests closing the popover once an accepted date is selected.
- Range mode (
mode="range"): usesrange/defaultRange. Selecting the first endpoint keeps the popover open; selecting the second accepted endpoint completes the range and requests closing once. - Multiple mode (
mode="multiple"): usesvalues/defaultValues. The popover stays open as dates are toggled and closes through normal Popover dismissal. - Selection callbacks, date constraints (
min,max,unavailable), and count/night limits (minSelected,maxSelected,minNights,maxNights) are inherited directly from Calendar.
Formatted display and focus
Section titled “Formatted display and focus”Valuedisplays a single ISO date, a comma-separated sorted list for multiple dates,from …for a pending range,from – tofor a completed range, orplaceholderwhen empty.- Popover manages dismissal and focus restoration; in controlled
openmode, your application can still approve or ignore close requests.
Open state props belong to Popover; mode, value / values / range, constraints, and month belong to Calendar. Date Picker itself defines one prop on Value:
| Prop | Type | Default |
|---|---|---|
placeholder | string | Pick a date |