Components
MonthView
Displays a traditional calendar grid with month-level navigation.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| numberOfMonths | number | 1 | Number of months to display simultaneously (1–12). |
| fixedWeeks | boolean | false | When true, always render 6 week rows per month grid.
Prevents layout shifts when navigating between months. |
| outsideDays | OutsideDays | "enabled" | Controls how days from adjacent months are displayed. |
| overflowBehavior | MonthOverflowBehavior | "unbounded" | How month navigation behaves at min/max bounds.
- "unbounded" — navigation is always allowed.
- "stop" — navigation buttons disable at the boundary. |
| month | PlainYearMonth | — | The controlled visible month. When provided, the component is controlled. |
| defaultMonth | PlainYearMonth | — | The initial visible month (uncontrolled). |
| onMonthChange | (month: PlainYearMonth) => void | — | Called when the visible month changes via navigation or focus movement. Not called on initial mount. |
| children | React.ReactNode | — | React children. |
Hooks
| Prop | Type | Default | Description |
|---|---|---|---|
| numberOfMonths* | number | — | Number of simultaneously visible months. |
| fixedWeeks* | boolean | — | Whether month grids always render 6 week rows. |
| outsideDays* | OutsideDays | — | How outside-month days are displayed. |
| overflowBehavior* | MonthOverflowBehavior | — | How month navigation behaves at bounds. |
| goNextMonth* | () => void | — | Navigate to the next month(s). |
| goPrevMonth* | () => void | — | Navigate to the previous month(s). |
| setGridLabelId* | (monthIndex: number, id: string | undefined) => void | — | Register (or clear) the id of a label element for aria-labelledby, keyed by month index. |
| gridFocusedRef* | React.RefObject<boolean> | — | Ref tracking whether the grid currently holds DOM focus (avoids state re-renders). |
| Prop | Type | Default | Description |
|---|---|---|---|
| currentMonth* | { year: number; month: number; } | — | The primary displayed month (year + month). |
| weeks* | PlainDate[][] | — | 2D array of weeks for the first visible month grid. |
| allMonths* | MonthData[] | — | Pre-computed data for all visible months (length = numberOfMonths). |
| currentDateTime* | PlainDateTime | — | Date-time representing the viewed month with time from the selection (for "today" highlighting). |
| gridLabelIds* | Record<number, string> | — | Map of month index to label element id (for per-grid aria-labelledby). |
| rootState* | RootState | — | The root component's state object for render functions. |