pub struct TimePickerProps {
pub value: Option<TimeValue>,
pub default_value: Option<TimeValue>,
pub placeholder: Option<String>,
pub format: Option<String>,
pub hour_step: Option<u8>,
pub minute_step: Option<u8>,
pub second_step: Option<u8>,
pub disabled: Option<bool>,
pub allow_clear: Option<bool>,
pub class: Option<String>,
pub style: Option<String>,
pub on_change: Option<EventHandler<Option<TimeValue>>>,
}Expand description
Props for the TimePicker component (MVP subset).
Fields§
§value: Option<TimeValue>Controlled time value.
default_value: Option<TimeValue>Initial value in uncontrolled mode.
placeholder: Option<String>Placeholder shown when no time is selected.
format: Option<String>Display/parse format. MVP: primarily HH:mm:ss.
hour_step: Option<u8>Step for hour column.
minute_step: Option<u8>Step for minute column.
second_step: Option<u8>Step for second column.
disabled: Option<bool>Whether the picker is disabled.
allow_clear: Option<bool>Whether to show a clear icon.
class: Option<String>Extra class on the root element.
style: Option<String>Inline style for the root element.
on_change: Option<EventHandler<Option<TimeValue>>>Change callback.
Implementations§
Source§impl TimePickerProps
impl TimePickerProps
Sourcepub fn builder() -> TimePickerPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> TimePickerPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building TimePickerProps.
On the builder, call .value(...)(optional), .default_value(...)(optional), .placeholder(...)(optional), .format(...)(optional), .hour_step(...)(optional), .minute_step(...)(optional), .second_step(...)(optional), .disabled(...)(optional), .allow_clear(...)(optional), .class(...)(optional), .style(...)(optional), .on_change(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of TimePickerProps.
Trait Implementations§
Source§impl Clone for TimePickerProps
impl Clone for TimePickerProps
Source§fn clone(&self) -> TimePickerProps
fn clone(&self) -> TimePickerProps
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more