API Reference
RootState
interfaceState 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
| Prop | Type | Default | Description |
|---|---|---|---|
| hasSelection* | boolean | — | true when at least one date is selected. |
| selected* | PlainDate | undefined | — | The primary selected date (the first committed date), or undefined. |
| selectedDates* | PlainDate[] | — | All currently selected dates (chronological in multiple mode). |
| rangeStart* | PlainDate | undefined | — | Range start, or undefined. |
| rangeEnd* | PlainDate | undefined | — | Range end, or undefined. |
| focused* | PlainDate | — | The currently focused PlainDate in the grid. |
| viewing* | PlainYearMonth | — | The month/year currently being viewed. |
| timeZone* | string | — | Resolved IANA time zone. |
| locale* | string | — | Resolved BCP 47 locale. |
| readOnly* | boolean | — | Whether the calendar is read-only. |