Values are ISO dates ("2026-10-06"), submitted as such. ArrowDown on the field opens the calendar; Escape closes it. On a touch screen the trigger opens the system's picker instead (native).
Property
Attribute
Type
Default
Description
value
value
string
The chosen date, ISO "YYYY-MM-DD" ("" for none). The value attribute is the initial value (restored on form reset).
min
min
string
Earliest selectable date (ISO). Earlier days are disabled; an earlier value is invalid (rangeUnderflow).
max
max
string
Latest selectable date (ISO).
placeholder
placeholder
string
Pick a date(text date-picker.placeholder)
Shown while no date is chosen.
format
format
short | medium | long | full
medium
How the date is displayed (Intl dateStyle).
locale
locale
string
Locale for names and formats. Default: the nearest lang attribute, else the browser's.
firstDay
first-day
number
First day of the week, 0 (Sunday) to 6. Default: the locale's.
clearable
clearablereflects
boolean
Shows a button that clears the date.
open
openreflects
boolean
The calendar dropdown is shown.
native
nativereflects
auto | always | never
auto
Which picker the trigger opens: the system's (the native date input's, the usual one on a phone) or the calendar dropdown. auto: the system's on a touch screen (pointer: coarse), else the calendar. A date picked in the system's picker is the value like one picked in the calendar.
name
namereflects
string
Form field name.
label
label
string
Visible label (also the accessible name).
description
description
string
Help text.
descriptionPosition
description-positionreflects
above | below
above
The description before the control (help first) or after it, with the error (fields in a row stay aligned).
error
error
string
Error text.
required
required
boolean
Required for form submission.
disabled
disabled
boolean
Not interactive nor submitted.
size
sizereflects
xs | sm | md | lg | xl
sm
Height and font size.
radius
radius
xs | sm | md | lg | xl | full
Corner radius.
variant
variantreflects
default | filled | unstyled
default
Box style.
Event
Description
input
When the date changes (picked or cleared).
change
When the date changes (picked or cleared).
ray-open
The calendar opened.
ray-close
The calendar closed.
Part
Description
trigger
The button showing the date.
clear
The clear button.
dropdown
The calendar panel (a popover in the top layer).
calendar
The <ray-calendar> in the dropdown (its day, day-selected, day-today, day-outside, day-disabled, caption, nav and grid parts are exported).
input
The hidden native <input type=date> that holds the value (the model).
wrapper
The box.
<ray-calendar>
WAI-ARIA grid: arrows move by day and week, Home/End to the week's ends, PageUp/PageDown by month (with Shift, by year), Enter/Space select.
Property
Attribute
Type
Default
Description
value
value
string
The selected date, ISO "YYYY-MM-DD".
min
min
string
Earliest selectable date (ISO).
max
max
string
Latest selectable date (ISO).
locale
locale
string
Locale for month and weekday names. Default: the nearest lang attribute, else the browser's.
firstDay
first-day
number
First day of the week, 0 (Sunday) to 6. Default: the locale's.
size
sizereflects
xs | sm | md | lg | xl
sm
Day cell size and font size.
fullWidth
full-widthreflects
boolean
Fills the width of its container: the columns share it and the days grow square, up to --ray-calendar-max-cell (default 1.5 times the size's cell), then wider than tall. Without it the calendar takes its size's width and shrinks when its container is narrower.
dayState
—
function
Marks days: called with each day's ISO date on every render, it returns a state name (letters, digits, - and _; not selected, today, outside nor disabled, the calendar's own parts) or nothing. The day button gets data-state and the part day-<state>, so ::part(day-taken) (or ::part(day-missed)::after for a dot) styles it from outside. Call refresh() when what it marks changed but the month did not.
Event
Description
change
A day was selected (read `value`).
Part
Description
header
The row with the month and the navigation buttons.
caption
The month and year.
nav
The previous/next month buttons.
grid
The day grid (role=grid).
day
Each day button (data-date="YYYY-MM-DD", [data-selected], [aria-current=date], [aria-disabled], [data-outside], and with dayState data-state plus the part day-<state>). ::part() takes no attribute selector, so what the day is comes as part tokens too: day-selected, day-today, day-outside, day-disabled, combinable with day-<state> (::part(day-taken day-selected)).
day-selected
The selected day (also part day).
day-today
Today (also part day).
day-outside
A day of the month before or after (also part day).
day-disabled
A day out of min/max (also part day).
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).