Page History
(this page was created automatically. In case of formatting issues, please visit the official Wiki Page)
Calendar
Figma link: tba
Overview
- The Dynamic Calendar component lets users view, select, and interact with dates or date ranges.
- It supports different visualization modes for navigating days, months, and years.
- It can display indicators on specific dates to reflect events or important information.
- It is useful for showing events, appointments, and important dates in applications.
...
- useMockData — Determines whether sample indicator data is used for demonstration. When enabled, predefined color indicators appear without a real data source (useful for demos and automated tests).
Guidelines
[NO DATA AVAILABLE]
Accessibility
...
Usage
- Use when users need to pick one date or a contiguous date range. Choose the interaction via
selectionMode: "date"(single) or"timeframe"(range). - Start users in the relevant period with
viewDateand constrain navigation withminZoomMode/maxZoomMode. - Expose stable hooks for tests and analytics via
idanddataTestId.
Interactions & Events
- React to user selection by handling
ON_CALENDAR_DATETIME_CHANGEto update related UI or trigger logic.
Visibility & Authorization
- Show or hide the calendar based on runtime context using
displayConditions. - Gate access with
visibilityPolicySetIdwhen role-based visibility is needed.
Dos & Don’ts
| Do | Don’t | Article setting(s) |
|---|---|---|
Set selectionMode: "timeframe" when ranges are required so users can drag/select a span. | Simulate ranges in "date" mode (it emits only a single date). | selectionMode, events.ON_CALENDAR_DATETIME_CHANGE |
Constrain zoom with minZoomMode/maxZoomMode to the levels your use case needs. | Allow unrestricted zooming that sends users into irrelevant levels. | minZoomMode, maxZoomMode |
Initialize the first visible month with viewDate to match the task (e.g., next month for planning). | Rely on defaults that open on an unhelpful month. | viewDate |
| Populate indicators through a data source and pass scoped filters. | Hard-code indicator dots or mix mock and real data in production. | fetchEntityCollectionDataSourceId, getEntityCollectionHttpRequestParametersMap, useMockData |
Treat ON_CALENDAR_DATETIME_CHANGE as the place to react to user selection. | Poll the component for selection state. | events.ON_CALENDAR_DATETIME_CHANGE |
| Use the guided-tour hotspot with brief, localized text as optional help. | Place essential instructions only in the hotspot/tooltip-style copy. | enableAsHotspot, guidedTourHotSpotTitle, guidedTourHotSpotDescription |
Accessibility
Protocol of implemented accessibility measures
- Provide concise, localized helper text via
guidedTourHotSpotTitle/guidedTourHotSpotDescriptionwhenenableAsHotspotis used. - Reduce cognitive load by starting in-context with
viewDateand keeping navigation bounded withminZoomMode/maxZoomMode. - Ensure deterministic automation and auditability with
dataTestIdandid. - Avoid color-only meaning by pairing indicator visuals with reactions to
ON_CALENDAR_DATETIME_CHANGE(e.g., updating nearby text). - Use
displayConditionsto prevent rendering when irrelevant, reducing tab stops and screen-reader noise.