Skip to main content

time_picker_dialog

Function time_picker_dialog 

Source
pub fn time_picker_dialog() -> TimePickerDialogBuilder
Expand description

§time_picker_dialog

Render a time picker dialog body with optional action buttons.

§Usage

Use inside dialog_provider when presenting a modal time selection flow.

§Parameters

  • dialog — registration scope received from the provider content slot.
  • state — state handle used by the embedded time picker.
  • title — optional override for the dialog title.
  • confirm_button — optional confirm button content.
  • dismiss_button — optional dismiss button content.
  • show_mode_toggle — whether the display mode toggle is shown.
  • picker_modifier — modifier chain applied to the embedded picker.
  • picker_initial_hour — initial picker hour.
  • picker_initial_minute — initial picker minute.
  • picker_is_24_hour — whether the picker uses 24-hour mode.
  • picker_display_mode — initial picker display mode.
  • picker_hour_step — hour step size for the picker.
  • picker_minute_step — minute step size for the picker.
  • picker_layout — preferred dial arrangement; defaults to vertical.

§Examples

use tessera_ui::remember;
use tessera_components::time_picker::{TimePickerLayout, TimePickerState, time_picker_dialog};

let state = remember(TimePickerState::default);
time_picker_dialog()
    .state(state)
    .picker_layout(TimePickerLayout::Horizontal);