API Reference

WeeksViewStableContextValue

interface

Stable values (config + callbacks) provided by WeeksView.Root.

Defined in package/src/weeks-view-types.ts:83

PropTypeDefaultDescription
weekCount*number—Number of week rows to display (the prop value).
scrollBy*"row" | "page"—How much to scroll per navigation step.
outOfRangeBehavior*OutOfRangeBehavior—How navigation behaves at bounds.
goNext*(shiftBy?: number | undefined) => void—Navigate to the next week(s). Optionally override the shift amount (in weeks).
goPrev*(shiftBy?: number | undefined) => void—Navigate to the previous week(s). Optionally override the shift amount (in weeks).
scrollToWeek*(target: FirstWeekSpec, options?: { snap?: ScrollToWeekSnap; } | undefined) => void—Imperatively scroll so that the target week is visible at the given snap position.
gridFocusedRef*React.MutableRefObject<boolean>—Ref tracking whether the grid currently holds DOM focus (avoids state re-renders).
setGridLabelId*(id: string | undefined) => void—Register (or clear) the id of a label element for aria-labelledby.