Fine-tune light, shadows, borders, neumorphic
Light and shadows
Borders
Neumorphic
Forms

Calendar <pm-calendar>

Calendar (WAI-ARIA date grid) with month and year views: click the title to jump to a month, then to a year.

Full screen

Props

<script type="module"> import '@prismora/css'; import '@prismora/elements/calendar'; </script> <pm-calendar></pm-calendar>

Overview

Single date or range selection, months="2" side by side, min/max, disabled dates, locale-aware week start and names. Keys: arrows move by day/week, PgUp/PgDn month (+Shift year), Home/End week edges, Enter/Space select; in month/year views arrows move, Enter picks, Esc goes back.

Attributes

AttributeTypeDefaultDescription
prev-label
prop: prevLabel
string—Name of the previous-month button (default "Previous month"), for another language.
next-label
prop: nextLabel
string—Name of the next-month button (default "Next month").
valuestring—"YYYY-MM-DD", or "YYYY-MM-DD/YYYY-MM-DD" with range.
minstring—Lowest allowed value.
maxstring—Highest allowed value.
localestring—BCP 47 locale for names and week start (defaults to the document language).
rangebooleanfalseSelect a start and end date instead of one date.
first-day
prop: firstDay
number—Override the locale's first day of the week (0 = Sunday).
monthsnumber1Number of months shown side by side (1–3).
view'days' | 'months' | 'years'daysCurrent view: day grid, month picker or year picker.

Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.

Events

EventReact / Svelte propDescription
pm-changeonPmChangeSelection changed. detail.value is "YYYY-MM-DD", or "start/end" with range.

Methods

showDate()

Used in templates

Appointment booking