pub struct Month<'a> { /* private fields */ }Expand description
Renders a month.
Implementations§
Source§impl<'a> Month<'a>
impl<'a> Month<'a>
pub fn new() -> Self
Sourcepub fn date(self, s: NaiveDate) -> Self
pub fn date(self, s: NaiveDate) -> Self
Sets the starting date. This can be any date of the month. If no date is set, the start_date of the state is used.
Sourcepub fn day_selection(self) -> Self
pub fn day_selection(self) -> Self
Date selection enabled
Sourcepub fn week_selection(self) -> Self
pub fn week_selection(self) -> Self
Week selection enabled
Sourcepub fn show_weekdays(self) -> Self
pub fn show_weekdays(self) -> Self
Show weekday titles
Sourcepub fn styles(self, s: MonthStyle) -> Self
pub fn styles(self, s: MonthStyle) -> Self
Set the composite style.
Sourcepub fn select_style(self, style: Style) -> Self
pub fn select_style(self, style: Style) -> Self
Style for the selected tab.
Sourcepub fn focus_style(self, style: Style) -> Self
pub fn focus_style(self, style: Style) -> Self
Style for a focused tab.
Sourcepub fn day_styles(self, styles: &'a HashMap<NaiveDate, Style>) -> Self
pub fn day_styles(self, styles: &'a HashMap<NaiveDate, Style>) -> Self
Sets all the day-styles.
Sourcepub fn week_style(self, s: impl Into<Style>) -> Self
pub fn week_style(self, s: impl Into<Style>) -> Self
Set the week number style
Sourcepub fn weekday_style(self, s: impl Into<Style>) -> Self
pub fn weekday_style(self, s: impl Into<Style>) -> Self
Set the week day style
Sourcepub fn title_style(self, s: impl Into<Style>) -> Self
pub fn title_style(self, s: impl Into<Style>) -> Self
Set the month-name style.
Sourcepub fn title_align(self, a: Alignment) -> Self
pub fn title_align(self, a: Alignment) -> Self
Set the mont-name align.
Sourcepub fn height(&self, state: &MonthState) -> u16
pub fn height(&self, state: &MonthState) -> u16
Inherent height for the widget. Can vary with the number of months.
Trait Implementations§
Source§impl StatefulWidget for Month<'_>
impl StatefulWidget for Month<'_>
Auto Trait Implementations§
impl<'a> Freeze for Month<'a>
impl<'a> RefUnwindSafe for Month<'a>
impl<'a> Send for Month<'a>
impl<'a> Sync for Month<'a>
impl<'a> Unpin for Month<'a>
impl<'a> UnwindSafe for Month<'a>
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<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