Skip to content

Date Picker ​

An accessible, keyboard-navigable date picker with an inline calendar popup. Supports day / month / year drill-down views, min/max bounds, disabled weekend days, and native form association.

Basic Usage ​

Full width

Listen for the change event to react to selections:

js
document.querySelector('ore-date-picker').addEventListener('change', (e) => {
  console.log(e.currentTarget.value); // '2025-06-15' or ''
});

With Min / Max Bounds ​

Restrict the selectable range with ISO 8601 min and max attributes.

Full width

Disabling Weekends ​

Pass a JSON array of day-of-week indices (0 = Sunday … 6 = Saturday) to weekend-days.

Full width

Locale ​

Override the display locale with any BCP 47 tag. Day and month names update automatically, and the grid follows the locale's week start (de-DE renders a Monday-first week, en-US a Sunday-first one).

Full width

Pre-selected Value ​

Set value to an ISO 8601 date string to initialise the selection.

Full width

Form Integration ​

ore-date-picker is form-associated. The submitted value is the ISO 8601 string or empty string when no date is selected.

Full width

Sizes ​

Full width

Variants ​

Full width

Colors ​

Full width

Error and Helper Text ​

Full width

Disabled ​

Full width

API ​

Props ​

PropTypeDefaultDescription
valuestringN/ASelected date in ISO 8601 format (yyyy-MM-dd)
minstringN/AMinimum selectable date (yyyy-MM-dd, inclusive)
maxstringN/AMaximum selectable date (yyyy-MM-dd, inclusive)
labelstringN/AVisible label
label-placement'inset' | 'outside''inset'Label position
placeholderstringN/ATrigger placeholder when no date selected
namestringN/AForm field name
disabledbooleanfalseDisable the picker
requiredbooleanfalseMark as required
errorstringN/AError message (shown below trigger in error color)
helperstringN/AHelper text (shown below trigger)
localestringbrowser localeBCP 47 locale for day/month names
weekend-daysstringN/AJSON array of day indices to disable (e.g. "[0,6]")
colorstringN/ATheme color (primary, secondary, info, success, warning, error)
sizestring'md'Size variant: sm, md, lg
variantstringN/AVisual variant: flat, solid, bordered, outline, ghost
roundedstringN/ABorder radius override
fullwidthbooleanfalseExpand to full container width

Events ​

EventDetailDescription
change{ isoValue: string | null }Fired when a date is selected. isoValue is the ISO 8601 date string or null when cleared

CSS Custom Properties ​

PropertyDescription
--date-picker-bgCalendar panel background
--date-picker-border-colorCalendar panel border
--date-picker-radiusBorder radius of trigger and calendar
--date-picker-shadowCalendar drop shadow
--date-picker-day-selected-bgBackground of the selected day cell (theme base color)
--date-picker-day-today-colorText color of today's date (theme base color)
--date-picker-day-outside-colorColour of day numbers outside the visible month

Parts ​

PartDescription
fieldThe trigger button / field
calendarThe floating calendar panel
headerCalendar navigation header
gridDay grid (role="grid")
dayIndividual day cell

Accessibility ​

ore-date-picker follows the ARIA Date Picker Dialog Pattern.

The trigger has role="combobox" and aria-haspopup="dialog", with aria-expanded reflecting the open/closed state. The calendar panel has role="dialog" and aria-modal="true". Each view (day/month/year) uses role="grid" with cells grouped into role="row" elements; the day view additionally renders role="columnheader" weekday labels, and every cell is a role="gridcell" carrying aria-selected/aria-disabled. Today's date receives aria-current="date". Disabled days have tabindex="-1" and pointer-events: none.

Keyboard navigation is fully supported: Escape closes the calendar from any focused element inside it. In the day grid, ArrowRight/ArrowLeft move by one day, ArrowDown/ArrowUp move by one week, and Home/End move to the first or last day of the current row. The month and year grids support the same arrow-key/Home/End roving navigation over their 4-column layout.