MaterialDatePickerState
struct · ferroui-themes-material · v0.5.0
struct MaterialDatePickerState
A restorable native selection snapshot. End dates are inclusive. An incomplete range has a start and no end; an invalid or reversed programmatic range clears both ends.
Members
selected_startselected_enddisplayed_monthmodeselection_modefirst_yearlast_yearcanonical_datecontains_yearset_selectionselect_dateset_displayed_monthset_modeset_year_rangeis_in_rangeis_completemonth_indexmonth_countmonth_at
selected_start
selected_start: Option<ferroui_base::utilities::DateTime>
selected_end
selected_end: Option<ferroui_base::utilities::DateTime>
displayed_month
displayed_month: ferroui_base::utilities::DateTime
mode
mode: MaterialDatePickerMode
selection_mode
selection_mode: MaterialDateSelectionMode
first_year
first_year: i32
last_year
last_year: i32
canonical_date
fn canonical_date(self: &Self, date: Option<DateTime>) -> Option<DateTime>
contains_year
fn contains_year(self: &Self, year: i32) -> bool
set_selection
fn set_selection(self: &mut Self, start: Option<DateTime>, end: Option<DateTime>)
select_date
fn select_date(self: &mut Self, date: DateTime)
Call only after checking the date and year selection policy. Range selection does not require every intervening day to be selectable, matching the native picker.
set_displayed_month
fn set_displayed_month(self: &mut Self, date: DateTime)
set_mode
fn set_mode(self: &mut Self, mode: MaterialDatePickerMode)
set_year_range
fn set_year_range(self: &mut Self, first: i32, last: i32)
is_in_range
fn is_in_range(self: &Self, date: DateTime) -> bool
is_complete
fn is_complete(self: &Self) -> bool
month_index
fn month_index(self: &Self, month: DateTime) -> i32
month_count
fn month_count(self: &Self) -> i32
month_at
fn month_at(self: &Self, index: i32) -> DateTime
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherEquivalent<K>CastableFrom<ST, Uninit, Uninit>CastableFrom<ST, Initialized, Initialized>Read<Exclusive, BecauseExclusive>CloneCopyDebugStructuralPartialEqPartialEqEqDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.