pub struct RangePickerProps {
pub value: Option<DateRangeValue>,
pub default_value: Option<DateRangeValue>,
pub placeholder: Option<(String, String)>,
pub format: Option<String>,
pub disabled: Option<bool>,
pub allow_clear: Option<bool>,
pub class: Option<String>,
pub style: Option<String>,
pub on_change: Option<EventHandler<DateRangeValue>>,
}Expand description
Props for the RangePicker component (MVP subset).
Fields§
§value: Option<DateRangeValue>Controlled range value. Each side may be None to represent a
partially selected range.
default_value: Option<DateRangeValue>Initial value in uncontrolled mode.
placeholder: Option<(String, String)>Placeholders for the start and end inputs.
format: Option<String>Display/parse format. MVP: primarily YYYY-MM-DD.
disabled: Option<bool>Whether the picker is disabled.
allow_clear: Option<bool>Whether to show a clear icon which resets the current range.
class: Option<String>Extra class on the root element.
style: Option<String>Inline style for the root element.
on_change: Option<EventHandler<DateRangeValue>>Change callback fired when the range changes.
Implementations§
Source§impl RangePickerProps
impl RangePickerProps
Sourcepub fn builder() -> RangePickerPropsBuilder<((), (), (), (), (), (), (), (), ())>
pub fn builder() -> RangePickerPropsBuilder<((), (), (), (), (), (), (), (), ())>
Create a builder for building RangePickerProps.
On the builder, call .value(...)(optional), .default_value(...)(optional), .placeholder(...)(optional), .format(...)(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 RangePickerProps.
Trait Implementations§
Source§impl Clone for RangePickerProps
impl Clone for RangePickerProps
Source§fn clone(&self) -> RangePickerProps
fn clone(&self) -> RangePickerProps
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more