Selection

Calendar

A month grid with today, selection and range states. Presentational; wire it to your own dates.

Examples

Calendar

October 2026
MoTuWeThFrSaSu

Anatomy

.calendarWrapper, sized to its grid.
> headerThe month title and the previous/next buttons, spaced apart.
.calendar-gridSeven equal columns.
> spanWeekday headings, muted. Seven, in display order.
> buttonOne per day, including the leading and trailing days of the adjacent months.

API

AttributeValuesDescription
aria-pressedtrueOn a day: solid accent, and announced as pressed. The selected day, or both ends of a range. aria-selected=true draws the same, for a day inside a role=gridcell.
aria-currentdateOn today: accent text and a 2px underline.
data-rangeon buttonbooleanDays inside a range: a light accent tint. Mark the ends too; aria-pressed draws over it.
data-outsideon buttonbooleanDays from the adjacent months: muted at half opacity.
disabledbooleanAn unavailable day: faded, ignores the pointer.

Accessibility

  • A day button's text is only a number. Give each an aria-label with the full date ("12 October 2026").
  • Use aria-pressed="true" on the selected day: aria-selected is not exposed on a plain <button>. Say a day is inside a range in its label too ("13 October 2026, in range").
  • aria-current="date" is valid on any element and announces today.
  • The previous/next buttons are icon-only and need an aria-label, as in the demo.
KeyEffect
TabMoves through the day buttons one at a time. There is no arrow-key grid navigation.
Enter / SpaceActivates the focused day; what that does is up to your script.
Jump to
ProportionFoundations
MaterialFoundations
PresetsFoundations
ShellLayouts · Application
Container and stacksLayouts · Pages
SplitLayouts · Pages
Grid, bento, masonryLayouts · Pages
Switcher and rowLayouts · Pages
↑↓Move↵OpenescClose