setSelection

abstract fun setSelection(selection: CalendarSelection)

Sets custom dates selection programmatically.

CalendarSelection needs to meet to validity criteria, otherwise this method will have no effect.

Validity criteria: – selection is within the CalendarParams.range – selection boundaries are not disabled dates – selection type corresponds to CalendarParams.selectionMode

If selection is CalendarSelection.Range:

  • range has start date set – start date is lower than end date (if end date is present)

Please note the changes won't apply immediately – the new state will be calculated in background thread.