TimePickerState


A state object that can be hoisted to observe the time picker state. It holds the current values and allows for directly setting those values.

See also
rememberTimePickerState

to construct the default implementation.

Summary

Public properties

Int

The currently selected hour (0-23).

Cmn
open Int

The input for the hour.

Cmn
Boolean

Indicates whether the time picker uses 24-hour format (true) or 12-hour format with AM/PM (false).

Cmn
Int

The currently selected minute (0-59).

Cmn
open Int

The raw input for the minute.

Cmn
TimePickerSelectionMode

Specifies whether the hour or minute component is being actively selected by the user.

Cmn

Extension properties

Boolean

true if the current hourInput represents a valid hour (0-23).

Cmn
Boolean

true if the time input values are valid.

Cmn
Boolean

true if the current minuteInput represents a valid minute (0-59).

Cmn
Boolean

Indicates whether the selected time falls within the period from 12 PM inclusive to 12 AM non inclusive.

Cmn

Public properties

hour

var hourInt

The currently selected hour (0-23).

hourInput

open var hourInputInt

The input for the hour. UI should be bound to this value. The default implementation validates the new value and updates hour if it's valid.

is24hour

var is24hourBoolean

Indicates whether the time picker uses 24-hour format (true) or 12-hour format with AM/PM (false).

minute

var minuteInt

The currently selected minute (0-59).

minuteInput

open var minuteInputInt

The raw input for the minute. UI should be bound to this value. The default implementation validates the new value and updates minute if it's valid.

selection

var selectionTimePickerSelectionMode

Specifies whether the hour or minute component is being actively selected by the user.

Extension properties

isHourInputValid

val TimePickerState.isHourInputValidBoolean

true if the current hourInput represents a valid hour (0-23).

isInputValid

val TimePickerState.isInputValidBoolean

true if the time input values are valid.

isMinuteInputValid

val TimePickerState.isMinuteInputValidBoolean

true if the current minuteInput represents a valid minute (0-59).

val TimePickerState.isPmBoolean

Indicates whether the selected time falls within the period from 12 PM inclusive to 12 AM non inclusive.