CalendarParams

data class CalendarParams(val selectionMode: CalendarParams.SelectionMode, val range: ClosedRange<LocalDate> = LocalDate.now()..LocalDate.now().plusYears(1), val cellsInfo: Map<LocalDate, CellInfo> = emptyMap(), val locale: Locale = Locale.getDefault(), val dayOfWeekText: TextStyle = findBestWeekdayStyleForLocale(locale), val dateContentDescriptionStyle: FormatStyle = FormatStyle.FULL, val now: LocalDate = LocalDate.now(), val monthSelectionMode: CalendarParams.MonthSelectionMode = MonthSelectionMode.Disabled)

Describes the calendar configuration.

Parameters

range

range of the dates available for selection (including ClosedRange.start and ClosedRange.endInclusive). Please notice that Calendar can display dates outside of the range (for instance, to render months in a complete form).

selectionMode

setting describing the selection behaviour

cellsInfo

additional information to be added to dates cell

locale

locale used for formatting and locale-specific behaviour, e.g. finding first day of week

dayOfWeekText

TextStyle to format days of week in calendar header. Beware of the fact that some Chinese languages may require SHORT style instead of NARROW.

now

LocalDate a date for the calendar to consider as current

monthSelectionMode

MonthSelectionMode setting describing the month selection behaviour

Constructors

Link copied to clipboard
constructor(selectionMode: CalendarParams.SelectionMode, range: ClosedRange<LocalDate> = LocalDate.now()..LocalDate.now().plusYears(1), cellsInfo: Map<LocalDate, CellInfo> = emptyMap(), locale: Locale = Locale.getDefault(), dayOfWeekText: TextStyle = findBestWeekdayStyleForLocale(locale), dateContentDescriptionStyle: FormatStyle = FormatStyle.FULL, now: LocalDate = LocalDate.now(), monthSelectionMode: CalendarParams.MonthSelectionMode = MonthSelectionMode.Disabled)

Types

Link copied to clipboard
sealed interface MonthSelectionMode

Describes the month selection behaviour

Link copied to clipboard
sealed interface SelectionMode

Describes the selection behaviour

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard