CalendarSelectionState

Snapshot-state wrapper around the core SelectionEngine.

Properties

Link copied to clipboard

Unavailable dates honored by clicks and drags and rendered automatically by DefaultDay. Refreshed on recomposition by rememberCalendarSelectionState — deliberately not a restart key, so inline-built instances never reset the selection.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun clear()
Link copied to clipboard
fun click(date: LocalDate)
Link copied to clipboard
fun dragEnd()

Ends the drag, validating min/max and intercepted dates; violations clear the end.

Link copied to clipboard
fun dragStart(date: LocalDate)

Begins a drag range selection at date. Only acts in SelectionMode.Range; SelectionMode.Week and SelectionMode.Month select their whole period on a single tap and ignore drags.

Link copied to clipboard
fun dragUpdate(date: LocalDate)

Live-updates the dragged range; start/end are kept ordered.

Link copied to clipboard
fun isDisabled(date: LocalDate): Boolean
Link copied to clipboard
fun isInRange(date: LocalDate): Boolean

True strictly inside a completed range (endpoints excluded).

Link copied to clipboard
fun isRangeEnd(date: LocalDate): Boolean

True for the end endpoint of a completed multi-day range.

Link copied to clipboard
fun isRangeStart(date: LocalDate): Boolean

True for the start endpoint of a completed multi-day range.

Link copied to clipboard
fun isSelected(date: LocalDate): Boolean

True for the single selection, a multi selection, or a range endpoint.

Link copied to clipboard

Emits every selection change, deduplicated; collect outside composition.

Link copied to clipboard
fun set(selection: Selection)

Replaces the selection programmatically (e.g. with a SelectionPresets value). The proposal is validated like clicks — mode constraints, bounds, and disabled dates — and violations leave the selection unchanged and fire the event callback. Setting Selection.Empty clears.