API
CalendarRange
Every field of the range, its default and what it changes on screen.
Fields
Type
type CalendarRange = { view: 'day' | 'week' | 'days' | 'month' | 'agenda' currentDate: string timeZone: string weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6 dayCount?: number slotMinutes?: number disambiguation?: Disambiguation }
| Field | Type | Default | Description |
|---|---|---|---|
view | 'day' | 'week' | 'days' | 'month' | 'agenda' | — | The period to draw, and whether it carries a time grid. |
currentDate | string | — | The date the calendar is on. The period drawn is the one that contains it — not a selection, and not read as today. |
timeZone | string | — | An IANA zone. Every event without one of its own is read in it, and the grid is built in it. |
weekStartsOn | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 1 | The first day of the week, Sunday being 0. Used by week and by the padding of month. |
dayCount | number | 7 / 30 | The span of days and agenda. Below one throws. |
slotMinutes | number | 60 | The height of one grid row in wall-clock minutes. Outside 1 to 1440 throws. |
disambiguation | 'compatible' | 'earlier' | 'later' | 'reject' | 'compatible' | What a wall time means when a DST transition made it ambiguous or impossible. Temporal’s own option, passed straight through. |
Examples
React
import type { CalendarRange } from '@midstem/chronous-react' const ranges: CalendarRange[] = [ // the anchor date itself { view: 'day', currentDate: '2026-03-25', timeZone: 'Europe/Kyiv' }, // Monday 23 to Sunday 29 — the week that contains the 25th { view: 'week', currentDate: '2026-03-25', timeZone: 'Europe/Kyiv' }, // seven days from the anchor: March 25 to 31; dayCount can override the default { view: 'days', currentDate: '2026-03-25', timeZone: 'Europe/Kyiv' }, // March, padded out to whole weeks { view: 'month', currentDate: '2026-03-25', timeZone: 'Europe/Kyiv' }, // the next thirty days as a list { view: 'agenda', currentDate: '2026-03-25', timeZone: 'Europe/Kyiv' }, ] // Pass a range to Calendar.Root or useCalendar to render this view.
Views & ranges walks through what each view draws and how a DST transition lands in a row.