Trait seed_datepicker::config::date_constraints::HasDateConstraints[][src]

pub trait HasDateConstraints {
    pub fn is_day_forbidden(&self, date: &NaiveDate) -> bool;
pub fn is_month_forbidden(&self, year_month_info: &NaiveDate) -> bool;
pub fn is_year_forbidden(&self, year: i32) -> bool;
pub fn is_year_group_forbidden(&self, year: i32) -> bool; }

Trait that can be implemented to create your own date constraints.

Required methods

pub fn is_day_forbidden(&self, date: &NaiveDate) -> bool[src]

Returns true if the given date is forbidden.

pub fn is_month_forbidden(&self, year_month_info: &NaiveDate) -> bool[src]

Returns true if the entire month described by year_month_info is forbidden.

pub fn is_year_forbidden(&self, year: i32) -> bool[src]

Returns true if the entire given year is forbidden.

pub fn is_year_group_forbidden(&self, year: i32) -> bool[src]

Returns true if the entire group of years including the given year is forbidden. A group of years are inclusive intervals [1980, 1999], [2000, 2019], [2020, 2039], …

Loading content...

Implementors

impl HasDateConstraints for DateConstraints[src]

impl<T> HasDateConstraints for PickerConfig<T> where
    T: HasDateConstraints + Default + Clone
[src]

Loading content...