API Reference

RootState

interface

State exposed by the Root component to its render function and descendants. All date values are Temporal objects (the internal representation), not the configured value format. The format-typed values are delivered through the value/defaultValue/onValueChange props; this state is for rendering, so use e.g. selected?.toLocaleString(locale) to display.

Defined in package/src/types.ts:223

PropTypeDefaultDescription
hasSelection*booleantrue when at least one date is selected.
selected*PlainDate | undefinedThe primary selected date (the first committed date), or undefined.
selectedDates*PlainDate[]All currently selected dates (chronological in multiple mode).
rangeStart*PlainDate | undefinedRange start, or undefined.
rangeEnd*PlainDate | undefinedRange end, or undefined.
focused*PlainDateThe currently focused PlainDate in the grid.
viewing*PlainYearMonthThe month/year currently being viewed.
timeZone*stringResolved IANA time zone.
locale*stringResolved BCP 47 locale.
readOnly*booleanWhether the calendar is read-only.