Skip to content

Calendar

Pick one date from a month table of buttons, with arrow-key travel and month paging. The selected ISO date syncs to a hidden input for forms, and every select or clear dispatches anink:calendar:change event.

Example

September 2026

MonTueWedThuFriSatSun
<Calendar
  id="depart-cal"
  name="depart"
  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.

Preselected with min and max

December 2026

MonTueWedThuFriSatSun
<Calendar
  id="return-cal"
  name="return"
  month="2026-12"
  value="2026-12-25"
  min="2026-12-20"
  max="2026-12-31"
  locale="en-GB"
/>

Days outside min/max render disabled, as do the out-of-month filler days. Clicking the selected day again clears the value (hidden input empties, event fires with null). A garbage month falls back to the value month, then today.

Props

PropTypeDefaultDescription
idstring-Required. Names the Field label wrapper.
labelstring"Choose a date"Visible label; also names the date table.
namestring-Hidden-input form name; carries the ISO date. No hidden input when omitted.
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 visible month; garbage falls back to value, then today.
localestring-BCP 47 locale for day and month names; runtime default when omitted.
rangeStartstring (ISO)-Range start for in-painting; paints the day selected. Composition API for a range picker, which owns the range state.
rangeEndstring (ISO)-Range end for in-painting; paints the day selected. Days strictly between gain the in-range class and ", in selected range" label suffix.
classstring-Style passthrough.

Accessibility