#[repr(C)]pub struct DatePicker {
pub state: DatePickerStateWrapper,
pub container_style: CssPropertyWithConditionsVec,
}Expand description
A calendar date picker.
Fields§
§state: DatePickerStateWrapper§container_style: CssPropertyWithConditionsVecStyle for the outer container.
Implementations§
Source§impl DatePicker
impl DatePicker
Sourcepub fn create(year: u32, month: u32, day: u32) -> Self
pub fn create(year: u32, month: u32, day: u32) -> Self
Creates a new DatePicker showing year/month with day selected.
month is clamped to 1..=12 and day to 1..=days_in_month.
Sourcepub fn set_on_change<C: Into<DatePickerOnChangeCallback>>(
&mut self,
data: RefAny,
callback: C,
)
pub fn set_on_change<C: Into<DatePickerOnChangeCallback>>( &mut self, data: RefAny, callback: C, )
Sets the callback invoked when the selection or month changes.
Sourcepub fn with_on_change<C: Into<DatePickerOnChangeCallback>>(
self,
data: RefAny,
callback: C,
) -> Self
pub fn with_on_change<C: Into<DatePickerOnChangeCallback>>( self, data: RefAny, callback: C, ) -> Self
Builder variant of Self::set_on_change.
Sourcepub fn swap_with_default(&mut self) -> Self
pub fn swap_with_default(&mut self) -> Self
Replaces self with the default value and returns the original.
pub fn dom(self) -> Dom
Trait Implementations§
Source§impl Clone for DatePicker
impl Clone for DatePicker
Source§fn clone(&self) -> DatePicker
fn clone(&self) -> DatePicker
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DatePicker
impl Debug for DatePicker
Source§impl Default for DatePicker
impl Default for DatePicker
impl Eq for DatePicker
Source§impl From<DatePicker> for Dom
impl From<DatePicker> for Dom
Source§fn from(d: DatePicker) -> Self
fn from(d: DatePicker) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DatePicker
impl PartialEq for DatePicker
impl StructuralPartialEq for DatePicker
Auto Trait Implementations§
impl Freeze for DatePicker
impl RefUnwindSafe for DatePicker
impl Send for DatePicker
impl Sync for DatePicker
impl Unpin for DatePicker
impl UnsafeUnpin for DatePicker
impl UnwindSafe for DatePicker
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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>
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 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>
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