Skip to main content

time_picker

Function time_picker 

Source
pub fn time_picker() -> TimePickerBuilder
Expand description

§time_picker

Render a time picker for selecting an hour and minute value.

§Usage

Use when users need to choose a time for reminders or scheduling.

§Parameters

  • modifier — modifier chain applied to the time picker.
  • initial_hour — initial hour for the internal state.
  • initial_minute — initial minute for the internal state.
  • is_24_hour — whether the internal state uses 24-hour mode.
  • display_mode — initial display mode for the internal state.
  • hour_step — pointer snapping interval for hour changes.
  • minute_step — pointer snapping interval for minute changes.
  • state — optional external state for selected time and display mode.
  • layout — preferred dial arrangement; defaults to vertical.

Labeled clock values and manual entry select their exact value. Pointer snapping steps apply to selecting a position on the dial.

§Examples

use tessera_components::time_picker::{TimePickerLayout, time_picker};

time_picker().layout(TimePickerLayout::Horizontal);