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 ​

PreviewCode
RTL
html
<div style="height: 400px;">
<ore-date-picker label="Appointment date"></ore-date-picker>
</div>

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.

PreviewCode
RTL
html
<ore-date-picker label="Conference date" min="2025-09-01" max="2025-09-30"> </ore-date-picker>

Disabling Weekends ​

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

PreviewCode
RTL
html
<ore-date-picker label="Business day" weekend-days="[0,6]"></ore-date-picker>

Locale ​

Override the display locale with any BCP 47 tag. Day and month names update automatically.

PreviewCode
RTL
html
<ore-date-picker label="Datum" locale="de-DE"></ore-date-picker>
<ore-date-picker label="日付" locale="ja-JP"></ore-date-picker>

Pre-selected Value ​

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

PreviewCode
RTL
html
<ore-date-picker label="Start date" value="2025-06-15"></ore-date-picker>

Form Integration ​

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

PreviewCode
RTL
html
<form>
  <ore-date-picker name="booking_date" label="Booking date" required></ore-date-picker>
  <button type="submit">Submit</button>
</form>

Sizes ​

PreviewCode
RTL
html
<ore-date-picker size="sm" placeholder="Small"></ore-date-picker>
<ore-date-picker size="md" placeholder="Medium"></ore-date-picker>
<ore-date-picker size="lg" placeholder="Large"></ore-date-picker>

Variants ​

PreviewCode
RTL
html
<ore-date-picker variant="flat" placeholder="Flat"></ore-date-picker>
<ore-date-picker variant="bordered" placeholder="Bordered"></ore-date-picker>
<ore-date-picker variant="outline" placeholder="Outline"></ore-date-picker>
<ore-date-picker variant="ghost" placeholder="Ghost"></ore-date-picker>

Colors ​

PreviewCode
RTL
html
<ore-grid cols="2" cols-sm="3" cols-md="4" gap="md">
  <ore-date-picker placeholder="Default"></ore-date-picker>
  <ore-date-picker color="primary" placeholder="Primary"></ore-date-picker>
  <ore-date-picker color="secondary" placeholder="Secondary"></ore-date-picker>
  <ore-date-picker color="info" placeholder="Info"></ore-date-picker>
  <ore-date-picker color="success" placeholder="Success"></ore-date-picker>
  <ore-date-picker color="warning" placeholder="Warning"></ore-date-picker>
  <ore-date-picker color="error" placeholder="Error"></ore-date-picker>
</ore-grid>

Error and Helper Text ​

PreviewCode
RTL
html
<ore-date-picker label="Return date" helper="Pick a date within the next 30 days"> </ore-date-picker>

<ore-date-picker label="Departure date" error="A valid date is required" color="error"> </ore-date-picker>

Disabled ​

PreviewCode
RTL
html
<ore-date-picker label="Read-only date" value="2025-01-01" disabled></ore-date-picker>

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
--date-picker-day-today-colorText color of today's date
--date-picker-day-outside-opacityOpacity of days 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.