Skip to content

DatePicker

A button trigger opens a dialog with an embedded Calendar. Picking a day writes the ISO date to a hidden input, shows the long-form date on the trigger, and dispatches an ink:date:change event.

Example

<DatePicker
  id="departure"
  label="Departure date"
  name="departure"
  month="2026-09"
  locale="en-GB"
/>

The locale is set so day names render in English (formatLong follows the runtime default locale otherwise). Omit month to open on the selected value, or on today.

Constrained range

<DatePicker
  id="return"
  label="Return date"
  name="return"
  month="2026-12"
  min="2026-12-20"
  max="2026-12-31"
  locale="en-GB"
/>

Days outside min/max render disabled inside the popup. For a booking form that forbids the past, passmin as today in YYYY-MM-DD form.

Props

PropTypeDefaultDescription
idstring-Required. Names Field/panel/message ids (trigger itself carries no id).
labelstring-Visible label; kept in the trigger name and dialog name.
namestringidHidden-input form name; carries the ISO date.
valuestring (ISO)-Preselected date; unknown strings select nothing.
minstring (ISO)-Earliest selectable date; earlier days render disabled.
maxstring (ISO)-Latest selectable date; later days render disabled.
monthstring ("YYYY-MM")-Initial popup month; falls back to the value month, then today.
localestring-BCP 47 locale for day and month names; runtime default when omitted.
placeholderstring"Select {label}" (lowercased)Empty-state trigger text; pass placeholder to override.
hideValuebooleanfalseSkips the hidden input; composition API for a combined date-time field, which owns the value.
hintstring-Help text below the trigger.
errorstring-Error message; sets aria-invalid on the trigger.
requiredbooleanfalseMarks the label required.
disabledbooleanfalseNon-interactive; trigger cannot open.
classstring-Style passthrough.

Accessibility