pub struct DatePickerState {
pub year: i32,
pub month: i32,
pub selected: Option<[i32; 3]>,
pub range_end: Option<[i32; 3]>,
pub today: [i32; 3],
pub focused_day: usize,
pub view: DatePickerView,
pub picking_end: bool,
pub overlay: OverlayState,
pub anchor: Rect,
}Expand description
Caller-owned state for Frame::calendar_grid, Frame::date_picker, and Frame::date_range_picker.
Fields§
§year: i32§month: i32§selected: Option<[i32; 3]>§range_end: Option<[i32; 3]>§today: [i32; 3]§focused_day: usize§view: DatePickerView§picking_end: bool§overlay: OverlayState§anchor: RectImplementations§
Source§impl DatePickerState
impl DatePickerState
Sourcepub fn formatted_date(&self) -> String
pub fn formatted_date(&self) -> String
Formatted label for the current single date (M/D/YYYY).
Sourcepub fn formatted_range(&self) -> String
pub fn formatted_range(&self) -> String
Formatted label for the current date range (M/D/YYYY – M/D/YYYY).
Trait Implementations§
Source§impl Clone for DatePickerState
impl Clone for DatePickerState
Auto Trait Implementations§
impl Forget for DatePickerState
impl Freeze for DatePickerState
impl Move for DatePickerState
impl RefUnwindSafe for DatePickerState
impl Send for DatePickerState
impl Sync for DatePickerState
impl Unpin for DatePickerState
impl UnsafeUnpin for DatePickerState
impl UnwindSafe for DatePickerState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more