API Reference

WeeksView

component

Defined in package/src/weeks-view.tsx:133

PropTypeDefaultDescription
format"PlainDate""PlainDate"The value format used for date serialization. Determines the type of value, defaultValue, min, max, and callback parameters.
minPlainDate—Earliest selectable date. Dates before this are disabled.
maxPlainDate—Latest selectable date. Dates after this are disabled.
disabledbooleanfalseWhen true, the entire calendar is disabled.
readOnlybooleanfalseWhen true, the calendar is read-only. Keyboard navigation still works but selection is prevented.
isDateDisabled(date: PlainDate) => boolean—Callback to disable individual dates. Return true to disable a date. Called in addition to min/max bounds checking.
timeZonestringThe system's current time zone.IANA time zone identifier used for date/time conversions.
localestring"en-US"BCP 47 locale string used for formatting month names, weekday labels, and other locale-sensitive output.
temporalTemporalNamespace—The Temporal implementation to use. Not bundled — provide a Temporal namespace (e.g. from temporal-polyfill or @js-temporal/polyfill) unless the host exposes native Temporal. See RootOwnProps.temporal for links.
weekStartDayWeekStartDay0Day of the week the calendar grid starts on. 0 = Sunday, 1 = Monday, ..., 6 = Saturday.
childrenReact.ReactNode—React children.
selectionMode"single" | "range" | "multiple""single"
valuePlainDate | PlainDate[] | DateRange<"PlainDate"> | null—The controlled selected date. Pass null to clear.
defaultValuePlainDate | PlainDate[] | DateRange<"PlainDate">—
onValueChange((value: PlainDate | null, meta: ValueChangeMeta<PlainDate | null>) => void) | ((value: PlainDate | null, meta: ValueChangeMeta<PlainDate | null>) => void) | ((value: DateRange<"PlainDate"> | null, meta: ValueChangeMeta<DateRange<"PlainDate"> | null>) => void) | ((value: DateRange<"PlainDate"> | null, meta: ValueChangeMeta<DateRange<"PlainDate"> | null>) => void) | ((value: PlainDate[], meta: ValueChangeMeta<PlainDate[]>) => void) | ((value: PlainDate[], meta: ValueChangeMeta<PlainDate[]>) => void)—
weekCount*number—Number of week rows to display simultaneously.
firstWeekFirstWeekSpec | undefined—The controlled first visible week. When provided, the component is controlled.
defaultFirstWeekFirstWeekSpec | undefined—The initial first visible week (uncontrolled).
onFirstWeekChange((date: PlainDate) => void) | undefined—Called when the first visible week changes via navigation or focus movement.
scrollBy"row" | "page" | undefined"row"How much to scroll per navigation step. - "row" — scroll one week row at a time. - "page" — scroll a full page (all visible rows) at a time.
outOfRangeBehaviorOutOfRangeBehavior | undefined"unbounded"How the visible window behaves at the min/max bounds. min/max always restrict which **days are selectable**; this controls whether the window may scroll beyond them, and how the edge is handled. See OutOfRangeBehavior. - "unbounded" — navigation is never restricted by min/max. - "stop" — navigation halts once the next step has no in-range day. - "stop-shrink" — like "stop", but the window shrinks at the edge. - "snap" — overshooting jumps snap the window edge to the last/first in-range week. - "snap-shrink" — snap to the boundary, shrinking if still out of range.
onWindowChange((info: WindowInfo) => void) | undefined—Called when the visible window changes.
refReact.Ref<WeeksViewRootHandle> | undefined—Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref).
keyReact.Key | null | undefined—