Skip to main content

DatePickerLabels

Struct DatePickerLabels 

Source
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: SharedString

The modal header’s supporting text, e.g. “Select date”.

§no_selection: SharedString

The headline while nothing is selected in calendar mode.

§input_headline: SharedString

The input-mode headline, e.g. “Enter date” (or “Enter dates”).

§confirm: SharedString§cancel: SharedString§clear: SharedString§save: SharedString

The full-screen picker’s confirm action, e.g. “Save”.

§close: SharedString

Accessible 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: SharedString

Accessible name of the year grid / month and year lists.

§choose_month: SharedString§date_field: SharedString

Input-mode field labels and the format shown as placeholder.

§start_field: SharedString§end_field: SharedString§input_placeholder: SharedString§invalid_input: SharedString

Shown 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

Source§

fn clone(&self) -> DatePickerLabels

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,

Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more