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 yearLabelInMonthHeader: Boolean = false)

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

yearLabelInMonthHeader

Boolean controls whether year is displayed inline with the month name or if the existing floating version is used

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(), yearLabelInMonthHeader: Boolean = false)

Types

Link copied to clipboard

Describes the accessibility label of a day cell support Static string and dynamic string

Link copied to clipboard
sealed interface SelectionMode : Serializable

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