pub struct DatePickerLabels {Show 31 fields
pub title: SharedString,
pub no_selection: SharedString,
pub input_headline: SharedString,
pub confirm: SharedString,
pub cancel: SharedString,
pub clear: SharedString,
pub save: SharedString,
pub close: SharedString,
pub previous_month: SharedString,
pub next_month: SharedString,
pub previous_year: SharedString,
pub next_year: SharedString,
pub switch_to_input: SharedString,
pub switch_to_calendar: SharedString,
pub choose_year: SharedString,
pub choose_month: SharedString,
pub date_field: SharedString,
pub start_field: SharedString,
pub end_field: SharedString,
pub input_placeholder: SharedString,
pub invalid_input: SharedString,
pub weekday: Rc<dyn Fn(Weekday) -> SharedString>,
pub month: Rc<dyn Fn(u32) -> SharedString>,
pub month_short: Rc<dyn Fn(u32) -> SharedString>,
pub month_year: Rc<dyn Fn(i32, u32) -> SharedString>,
pub headline: Rc<dyn Fn(NaiveDate) -> SharedString>,
pub range_headline: Rc<dyn Fn(Option<NaiveDate>, Option<NaiveDate>) -> SharedString>,
pub accessible_date: Rc<dyn Fn(NaiveDate) -> SharedString>,
pub number: Rc<dyn Fn(i32) -> SharedString>,
pub format_input: Rc<dyn Fn(NaiveDate) -> SharedString>,
pub parse_input: Rc<dyn Fn(&str) -> Option<NaiveDate>>,
}Expand description
Every caller-supplied string and formatter of a date picker. Nothing user-facing is hard-coded in the component; galleries and apps build this from their locale.
Fields§
§title: SharedStringThe modal header’s supporting text, e.g. “Select date”.
no_selection: SharedStringThe headline while nothing is selected in calendar mode.
input_headline: SharedStringThe input-mode headline, e.g. “Enter date” (or “Enter dates”).
confirm: SharedString§cancel: SharedString§clear: SharedString§save: SharedStringThe full-screen picker’s confirm action, e.g. “Save”.
close: SharedStringAccessible names of icon-only controls.
previous_month: SharedString§next_month: SharedString§previous_year: SharedString§next_year: SharedString§switch_to_input: SharedString§switch_to_calendar: SharedString§choose_year: SharedStringAccessible name of the year grid / month and year lists.
choose_month: SharedString§date_field: SharedStringInput-mode field labels and the format shown as placeholder.
start_field: SharedString§end_field: SharedString§input_placeholder: SharedString§invalid_input: SharedStringShown under a field whose text does not parse.
weekday: Rc<dyn Fn(Weekday) -> SharedString>A narrow weekday letter for the weekday row (“S”, “M”, …).
month: Rc<dyn Fn(u32) -> SharedString>A full month name for the docked month list (1-based month).
month_short: Rc<dyn Fn(u32) -> SharedString>A short month name for the docked month menu button.
month_year: Rc<dyn Fn(i32, u32) -> SharedString>“August 2025”: the modal month button and full-screen month headers.
headline: Rc<dyn Fn(NaiveDate) -> SharedString>The single-date headline, e.g. “Mon, Aug 17”.
range_headline: Rc<dyn Fn(Option<NaiveDate>, Option<NaiveDate>) -> SharedString>The range headline, e.g. “Aug 17 – Aug 23” (either end may be open).
accessible_date: Rc<dyn Fn(NaiveDate) -> SharedString>The full date announced for a day cell.
number: Rc<dyn Fn(i32) -> SharedString>A day-of-month or year number.
format_input: Rc<dyn Fn(NaiveDate) -> SharedString>The text-input representation of a date, and its parser.
parse_input: Rc<dyn Fn(&str) -> Option<NaiveDate>>Trait Implementations§
Source§impl Clone for DatePickerLabels
impl Clone for DatePickerLabels
Source§fn clone(&self) -> DatePickerLabels
fn clone(&self) -> DatePickerLabels
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for DatePickerLabels
impl !Send for DatePickerLabels
impl !Sync for DatePickerLabels
impl !UnwindSafe for DatePickerLabels
impl Freeze for DatePickerLabels
impl Unpin for DatePickerLabels
impl UnsafeUnpin for DatePickerLabels
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more