🌈 Create new beautiful Compose Gradients with our new wesite ->
Interface

DatePickerState

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

Source set: Common
public interface DatePickerState

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

Properties

selectedDateMillis

Source set: Common
@get:Suppress("AutoBoxing") public var selectedDateMillis: Long?

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

Throws: IllegalArgumentException

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

displayedMonthMillis

Source set: Common
public var displayedMonthMillis: Long

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

Throws: IllegalArgumentException

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

displayMode

Source set: Common
public var displayMode: DisplayMode

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

yearRange

Source set: Common
public val yearRange: IntRange

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

selectableDates

Source set: Common
public val selectableDates: SelectableDates

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.

locale

Source set: Common
public val locale: CalendarLocale

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

Content updated: