Week

data class Week(val firstDayOfWeek: DayOfWeek? = null, val allowClear: Boolean = true) : SelectionMode

Tapping any day selects the whole 7-day week containing it, starting at firstDayOfWeek, as a range (Selection.rangeStart..Selection.rangeEnd). The week is clamped to the engine bounds and the click is rejected with SelectionEvent.Intercepted when any day in it is disabled. Tapping a day inside the selected week clears the selection when allowClear is true.

firstDayOfWeek = null (the default) follows the calendar's default: rememberCalendarSelectionState in orrery-compose resolves it to the locale's first day of week, the same default rememberCalendarState uses, so the selected week matches the visible row. A bare SelectionEngine resolves null to DayOfWeek.MONDAY. Pass an explicit value when the calendar overrides its own firstDayOfWeek.

Programmatic writes (SelectionEngine.replace, CalendarSelectionState.set and initialSelection) are snapped to the whole week containing Selection.rangeStart (clamped to the bounds), then validated like a tap; Selection.rangeEnd of the proposal is ignored.

Constructors

Link copied to clipboard
constructor(firstDayOfWeek: DayOfWeek? = null, allowClear: Boolean = true)

Properties

Link copied to clipboard
Link copied to clipboard
val firstDayOfWeek: DayOfWeek?