Calendar
ProAn 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
| Key | Action | Where |
|---|---|---|
| Tab | Moves into and out of the grid, which is one tab stop. | |
| Arrow keys | Move between cells, skipping a time the day doesn’t have. | |
| Home or End | Move to the row’s start or end. | |
| Ctrl + Home or Ctrl + End | Move to the view’s first or last cell. | |
| Page Up or Page Down | Change the period, keeping focus in the grid. | |
| Enter | Moves into a cell’s events; on an event, activates it. | |
| Arrow keys | Walk the cell’s events.On an event | On an event |
| Escape | Returns to the cell, or cancels an operation. | |
| Space | Starts a range: the arrows extend it and Enter confirms. | |
| M | Picks up an event: the arrows move it and Enter drops it.On an event | On an event |
| R | Resizes an event: the arrows change its end, Shift its start, and Enter confirms.On an event | 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-labeloraria-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-colcountand their indexes carry the true size;aria-selectedmarks 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
CanvasTextborder and today keepsHighlight.
What you need to do
- Give the calendar a name.
- Pass
timeZoneandnowwhen it renders on the server, so the first render is stable. - Apply each change to
eventsyourself, and returnfalseto reject one: rejections are announced. - Give an event a
statusin words where its colour carries meaning.