SelectionMode

Types

Link copied to clipboard
data class Month(val allowClear: Boolean = true) : SelectionMode

Tapping any day selects its whole month (first..last day) as a range, clamped to the engine bounds. The click is rejected with SelectionEvent.Intercepted when any day in it is disabled. Tapping a day inside the selected month clears the selection when allowClear is true.

Link copied to clipboard
data class Multi(val maxCount: Int? = null) : SelectionMode

Toggle set of days, optionally capped at maxCount.

Link copied to clipboard
data object None : SelectionMode
Link copied to clipboard
data class Range(val minDays: Int? = null, val maxDays: Int? = null) : SelectionMode

Start/end range. Day counts are inclusive: a range of one day has size 1. Values that are null or <= 0 mean unbounded; if min > max, both are treated as min (original setSelectRange semantics).

Link copied to clipboard
data class Single(val autoAdvance: Boolean = false, val autoSelectDay: AutoSelectDay = AutoSelectDay.FirstDayOfMonth) : SelectionMode

One selected day. autoAdvance = true reproduces the original "default" mode where paging months auto-selects a day (see autoSelectDay); false reproduces the original "single" mode where selection changes only on click.

Link copied to clipboard
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.