TimePickerState
-
Cmn
interface 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 ( |
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 |
|
Cmn
|
Boolean |
|
Cmn
|
Boolean |
|
Cmn
|
Boolean |
Indicates whether the selected time falls within the period from 12 PM inclusive to 12 AM non inclusive. |
Cmn
|
Public properties
hourInput
open var hourInput: Int
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 is24hour: Boolean
Indicates whether the time picker uses 24-hour format (true) or 12-hour format with AM/PM (false).
minuteInput
open var minuteInput: Int
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 selection: TimePickerSelectionMode
Specifies whether the hour or minute component is being actively selected by the user.
Extension properties
isHourInputValid
val TimePickerState.isHourInputValid: Boolean
true if the current hourInput represents a valid hour (0-23).
isMinuteInputValid
val TimePickerState.isMinuteInputValid: Boolean
true if the current minuteInput represents a valid minute (0-59).
isPm
val TimePickerState.isPm: Boolean
Indicates whether the selected time falls within the period from 12 PM inclusive to 12 AM non inclusive.