Components

MonthView

Displays a traditional calendar grid with month-level navigation.

Props

PropTypeDefaultDescription
numberOfMonthsnumber1Number of months to display simultaneously (1–12).
fixedWeeksbooleanfalseWhen true, always render 6 week rows per month grid. Prevents layout shifts when navigating between months.
outsideDaysOutsideDays"enabled"Controls how days from adjacent months are displayed.
overflowBehaviorMonthOverflowBehavior"unbounded"How month navigation behaves at min/max bounds. - "unbounded" — navigation is always allowed. - "stop" — navigation buttons disable at the boundary.
monthPlainYearMonthThe controlled visible month. When provided, the component is controlled.
defaultMonthPlainYearMonthThe initial visible month (uncontrolled).
onMonthChange(month: PlainYearMonth) => voidCalled when the visible month changes via navigation or focus movement. Not called on initial mount.
childrenReact.ReactNodeReact children.

Hooks

PropTypeDefaultDescription
numberOfMonths*numberNumber of simultaneously visible months.
fixedWeeks*booleanWhether month grids always render 6 week rows.
outsideDays*OutsideDaysHow outside-month days are displayed.
overflowBehavior*MonthOverflowBehaviorHow month navigation behaves at bounds.
goNextMonth*() => voidNavigate to the next month(s).
goPrevMonth*() => voidNavigate to the previous month(s).
setGridLabelId*(monthIndex: number, id: string | undefined) => voidRegister (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).
PropTypeDefaultDescription
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*PlainDateTimeDate-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*RootStateThe root component's state object for render functions.