TimePicker

fun TileSchemaBuilderScope.TimePicker(id: String = randomId(), events: EventSchemaBuilderScope.() -> Unit = {}, style: StyleSchemaBuilderScope.() -> Unit = {}, searchableTerms: List<String>? = null, visibility: TileSchema.Visibility = visible(), selectedTime: String? = null, enabled: Boolean = true, kind: TimePickerTileSchema.Kind = outlinedTimePicker(), confirmLabel: String, cancelLabel: String, supportingText: String? = null, state: TimePickerTileSchema.State = normalTimePicker())

Renders a read-only text field that opens a Material 3 time picker dialog when tapped. kind picks the field style — filled or outlined. Always shows an alarm leading icon, displays selectedTime (empty when null, as an ISO HH:mm string), forwards enabled and supportingText, and switches to Material's error styling when state is error. Typing is impossible — the field is read-only. The dialog is always 24-hour, uses the vertical layout, and opens at 00:00 when selectedTime is null. Opening, closing and time selection are handled entirely on the client: pressing the field opens the dialog, confirming stores the picked time and closes it, cancelling or dismissing just closes it — none of this needs a round trip to the server. The dialog's buttons are labelled with confirmLabel and cancelLabel. Dispatches onTimePickerOpen when pressed while closed, onTimeSelected (carrying the ISO time string) when confirmed, and onTimePickerClose when pressed while open, dismissed, cancelled, or right after a confirm. The current selectedTime can be read from this tile by its id via GetData — it produces no entry at all when no time is selected.

Parameters

id

Unique identifier of the tile. Defaults to a random id.

events

Events owned by this tile, wired to its triggers (onTimePickerOpen, onTimePickerClose, onTimeSelected).

style

Layout/appearance modifiers (size, padding, background, etc).

searchableTerms

Terms used by an ancestor's search/filter to decide whether this tile matches. Defaults to none.

visibility

Whether the tile is shown, hidden but occupies space, or removed from layout. Defaults to visible.

selectedTime

ISO (HH:mm) time shown in the field. Defaults to none.

enabled

Whether the field is interactive. Defaults to true.

kind

Visual style of the field — filled or outlined. Defaults to outlined.

confirmLabel

Label of the dialog's confirm button.

cancelLabel

Label of the dialog's cancel button.

supportingText

Helper text shown below the field. Defaults to none.

state

Visual state of the field — normal or error. Defaults to normal.