TimePickerState

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

to construct the default implementation.

Properties

Link copied to clipboard
@get:IntRange(from = 0, to = 23)
abstract var hour: Int

The currently selected hour (0-23).

Link copied to clipboard
@get:IntRange(from = 0)
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.

Link copied to clipboard
abstract var is24hour: Boolean

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

Link copied to clipboard

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

Link copied to clipboard

true if the time input values are valid.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
@get:IntRange(from = 0, to = 59)
abstract var minute: Int

The currently selected minute (0-59).

Link copied to clipboard
@get:IntRange(from = 0)
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.

Link copied to clipboard

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