pub struct NativeDatePickerView { /* private fields */ }Expand description
A real DATE-mode picker (no time) rendered from pure Rust —
android.widget.DatePicker, UIDatePicker, NSDatePicker. Controlled,
like NativeSwitchView: the app owns date, and a pick only ever
arrives through Self::on_change as a requested CivilDate the app
confirms by feeding it back. Build one with native_date_picker.
Implementations§
Source§impl NativeDatePickerView
impl NativeDatePickerView
Sourcepub fn min(self, min: CivilDate) -> Self
pub fn min(self, min: CivilDate) -> Self
The earliest selectable date — a missing bound is the arm’s own
default: unbounded on iOS/macOS, 1900-01-01 on Android. A date
before it is shown (and reported) as min; a max before it
collapses the range to the single day min. On Android, an
explicit min (and date) outside the platform’s own
1900-01-01..2100-12-31 range is clamped into it, with a warning
(native-widgets-android-date-picker-range in LIMITATIONS.md).
Sourcepub fn max(self, max: CivilDate) -> Self
pub fn max(self, max: CivilDate) -> Self
The latest selectable date — a missing bound is the arm’s own
default: unbounded on iOS/macOS, 2100-12-31 on Android. A date
after it is shown (and reported) as max. On Android, an explicit
max (and date) outside the platform’s own
1900-01-01..2100-12-31 range is clamped into it, with a warning
(native-widgets-android-date-picker-range in LIMITATIONS.md).
Sourcepub fn style(self, style: NativeDatePickerStyle) -> Self
pub fn style(self, style: NativeDatePickerStyle) -> Self
The presentation — see NativeDatePickerStyle. Default
NativeDatePickerStyle::Compact.
Sourcepub fn enabled(self, enabled: bool) -> Self
pub fn enabled(self, enabled: bool) -> Self
View.setEnabled / UIControl.enabled / NSControl.enabled —
default true.
Sourcepub fn content_description(self, label: impl Into<String>) -> Self
pub fn content_description(self, label: impl Into<String>) -> Self
The TalkBack/VoiceOver label.
Trait Implementations§
Source§impl Clone for NativeDatePickerView
impl Clone for NativeDatePickerView
Source§impl Component for NativeDatePickerView
impl Component for NativeDatePickerView
Source§impl<Outer: 'static> View<Outer> for NativeDatePickerView
impl<Outer: 'static> View<Outer> for NativeDatePickerView
Source§type Element = ComponentWidget<NativeDatePickerView>
type Element = ComponentWidget<NativeDatePickerView>
Source§fn build(&self, ctx: &mut BuildCtx<'_>) -> Self::Element
fn build(&self, ctx: &mut BuildCtx<'_>) -> Self::Element
Source§fn rebuild(
&self,
prev: &Self,
element: &mut Self::Element,
ctx: &mut BuildCtx<'_>,
) -> ChangeFlags
fn rebuild( &self, prev: &Self, element: &mut Self::Element, ctx: &mut BuildCtx<'_>, ) -> ChangeFlags
prev (the previous view of the same type) against the live
element, mutating it in place and reporting what changed.Auto Trait Implementations§
impl !RefUnwindSafe for NativeDatePickerView
impl !UnwindSafe for NativeDatePickerView
impl Freeze for NativeDatePickerView
impl Send for NativeDatePickerView
impl Sync for NativeDatePickerView
impl Unpin for NativeDatePickerView
impl UnsafeUnpin for NativeDatePickerView
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
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.