Date Picker
A date field that opens a calendar instead of parsing text — plus a range picker with presets.
Loading documentation…
DatePicker is a control that reads the date back and a
Calendar in a popover.
There is no text parsing. A field that accepts 3/4/25 has to decide
whether that is March or April, and it will be wrong for half the world. If you
need typed input, use three NumberFields or a native <input type="date">.
DatePicker.Range selects two dates and closes itself once the range is
complete. presets earn their keep here: nine times out of ten the answer is
"last 7 days", and clicking twice in a grid to say so is a small tax on every
visit.
Local time.
min, max and disabledDate are passed straight to the calendar, so the
popup cannot offer a date the field would reject.
Controlled and uncontrolled selection.
Fires when a day is chosen or cleared.
Shown while nothing is selected.
Control height. It defaults to base.
Bounds, passed to the calendar.
An extra rule on top of the bounds.
Used for the calendar's names and for formatting the value.
0 is Sunday, 1 is Monday. It defaults to 1.
Dims the control and ignores interaction.
Accessibility wiring when there is no visible label.
Everything above, with a range-shaped value, plus:
{ from, to }, both Date | null.
Fires on each end of the range.
Shortcut rows down the left side. range is a function returning a
DateRange, so "last 7 days" is computed when it is clicked, not when the
page rendered.
Shows two months side by side. It defaults to true.