Skip to content

Calendar

Pro

An event calendar with month, week, day, agenda, resource schedule and timeline views, in any time zone. Not an M3 component (@windmorph/react-pro).

import { Calendar, CalendarToolbar, CalendarMonthView, CalendarTimeGridView, CalendarAgendaView, CalendarTimelineView, CalendarEvent, useCalendarState } from '@windmorph/react-pro/calendar';

Part of Windmorph Pro, paid components on the free core, not on sale yet. See the Pro guide for what it includes and to register interest.

Keyboard

Calendar keyboard
KeyAction
TabMoves into and out of the grid, which is one tab stop.
Arrow keysMove between cells, skipping a time the day doesn’t have.
Home or EndMove to the row’s start or end.
Ctrl + Home or Ctrl + EndMove to the view’s first or last cell.
Page Up or Page DownChange the period, keeping focus in the grid.
EnterMoves into a cell’s events; on an event, activates it.
Arrow keysWalk the cell’s events.On an event
EscapeReturns to the cell, or cancels an operation.
SpaceStarts a range: the arrows extend it and Enter confirms.
MPicks up an event: the arrows move it and Enter drops it.On an event
RResizes an event: the arrows change its end, Shift its start, and Enter confirms.On an event
  • Tab during an operation cancels it and leaves the grid.
  • Left and Right mirror in right to left.

Screen reader

Role
Every view is one grid: weeks and days in the month, slots and days or resources in the time views, resources and times in the timeline, and one column of days in the agenda.
Accessible name
From aria-label or aria-labelledby, which the types require. A cell is named with its date, time, resource and event count, and an event with its title, time, duration, resource and status.
States announced
aria-rowcount, aria-colcount and their indexes carry the true size; aria-selected marks a range being chosen.
  • A polite live region reports period changes, picks, moves, drops, rejections and cancels.
  • Status is always words, and a blocked span has a pattern as well as a tint, so colour is never alone.

Focus

  • Focus stays in the grid when the period changes.
  • A virtualized row or column that holds focus stays mounted when it scrolls away.

Touch target

  • A long press starts a drag, so a swipe always scrolls.
  • On touch, each event has a menu with the same moves, at a 48px target.

Motion

  • Nothing in the calendar moves under reduced motion; an event only fades as it settles.
  • In forced colours events keep a CanvasText border and today keeps Highlight.

What you need to do

  • Give the calendar a name.
  • Pass timeZone and now when it renders on the server, so the first render is stable.
  • Apply each change to events yourself, and return false to reject one: rejections are announced.
  • Give an event a status in words where its colour carries meaning.