pub struct RangePicker { /* private fields */ }Expand description
A calendar with two ends and a running account of what they add up to.
Implementations§
Source§impl RangePicker
impl RangePicker
pub fn new( ident: impl Into<Ident>, adapter: SharedDateAdapter, window: &mut Window, cx: &mut Context<'_, Self>, ) -> Self
Sourcepub fn set_overlay(
&mut self,
overlay: impl Fn(Day) -> Option<DayMark> + 'static,
cx: &mut Context<'_, Self>,
)
pub fn set_overlay( &mut self, overlay: impl Fn(Day) -> Option<DayMark> + 'static, cx: &mut Context<'_, Self>, )
Marks days with a dot the host supplies, on the calendar underneath.
pub fn set_range(&mut self, range: Option<DayRange>, cx: &mut Context<'_, Self>)
pub fn set_disabled(&mut self, disabled: bool, cx: &mut Context<'_, Self>)
pub fn calendar(&self) -> &Entity<Calendar>
pub fn state(&self) -> RangeState
Sourcepub fn blocked(&self) -> BlockedReport
pub fn blocked(&self) -> BlockedReport
The days the adapter refuses inside the range, or the reason the question could not be answered.
Trait Implementations§
Source§impl Debug for RangePicker
impl Debug for RangePicker
Source§impl Disableable for RangePicker
impl Disableable for RangePicker
impl EventEmitter<RangePickerEvent> for RangePicker
Source§impl Focusable for RangePicker
impl Focusable for RangePicker
Source§fn focus_handle(&self, _cx: &App) -> FocusHandle
fn focus_handle(&self, _cx: &App) -> FocusHandle
Returns the focus handle associated with this view.
Source§impl Render for RangePicker
impl Render for RangePicker
Auto Trait Implementations§
impl !RefUnwindSafe for RangePicker
impl !Send for RangePicker
impl !Sync for RangePicker
impl !UnwindSafe for RangePicker
impl Freeze for RangePicker
impl Unpin for RangePicker
impl UnsafeUnpin for RangePicker
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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> ⓘ
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