DatePickerState


A state object that can be hoisted to observe the date picker state. See rememberDatePickerState.

Summary

Public properties

DisplayMode

A DisplayMode that represents the current UI mode (i.e. picker or input).

Cmn
Long

A timestamp that represents the currently displayed month start date in UTC milliseconds from the epoch.

Cmn
CalendarLocale

A locale that will be used when formatting dates, determining the input format, week-days, and more.

Cmn
SelectableDates

A SelectableDates that is consulted to check if a date is allowed.

Cmn
Long?

A timestamp that represents the selected date start of the day in UTC milliseconds from the epoch.

Cmn
IntRange

An IntRange that holds the year range that the date picker will be limited to.

Cmn

Public properties

displayMode

var displayModeDisplayMode

A DisplayMode that represents the current UI mode (i.e. picker or input).

displayedMonthMillis

var displayedMonthMillisLong

A timestamp that represents the currently displayed month start date in UTC milliseconds from the epoch.

Throws
kotlin.IllegalArgumentException

in case the value is set with a timestamp that does not fall within the yearRange.

locale

val localeCalendarLocale

A locale that will be used when formatting dates, determining the input format, week-days, and more.

selectableDates

val selectableDatesSelectableDates

A SelectableDates that is consulted to check if a date is allowed.

In case a date is not allowed to be selected, it will appear disabled in the UI.

selectedDateMillis

var selectedDateMillisLong?

A timestamp that represents the selected date start of the day in UTC milliseconds from the epoch.

Throws
kotlin.IllegalArgumentException

in case the value is set with a timestamp that does not fall within the yearRange.

yearRange

val yearRangeIntRange

An IntRange that holds the year range that the date picker will be limited to.