pub struct DatePickerButton<'a> { /* private fields */ }
Expand description
Shows a date, and will open a date picker popup when clicked.
Implementations§
Source§impl<'a> DatePickerButton<'a>
impl<'a> DatePickerButton<'a>
pub fn new(selection: &'a mut NaiveDate) -> Self
Sourcepub fn id_salt(self, id_salt: &'a str) -> Self
pub fn id_salt(self, id_salt: &'a str) -> Self
Add id source. Must be set if multiple date picker buttons are in the same Ui.
Sourcepub fn id_source(self, id_salt: &'a str) -> Self
👎Deprecated: Renamed id_salt
pub fn id_source(self, id_salt: &'a str) -> Self
Add id source. Must be set if multiple date picker buttons are in the same Ui.
Sourcepub fn combo_boxes(self, combo_boxes: bool) -> Self
pub fn combo_boxes(self, combo_boxes: bool) -> Self
Show combo boxes in date picker popup. (Default: true)
Sourcepub fn calendar(self, calendar: bool) -> Self
pub fn calendar(self, calendar: bool) -> Self
Show calendar in date picker popup. (Default: true)
Sourcepub fn calendar_week(self, week: bool) -> Self
pub fn calendar_week(self, week: bool) -> Self
Show calendar week in date picker popup. (Default: true)
Sourcepub fn show_icon(self, show_icon: bool) -> Self
pub fn show_icon(self, show_icon: bool) -> Self
Show the calendar icon on the button. (Default: true)
Sourcepub fn format(self, format: impl Into<String>) -> Self
pub fn format(self, format: impl Into<String>) -> Self
Change the format shown on the button. (Default: %Y-%m-%d)
See chrono::format::strftime
for valid formats.
Sourcepub fn highlight_weekends(self, highlight_weekends: bool) -> Self
pub fn highlight_weekends(self, highlight_weekends: bool) -> Self
Highlight weekend days. (Default: true)
Sourcepub fn start_end_years(self, start_end_years: RangeInclusive<i32>) -> Self
pub fn start_end_years(self, start_end_years: RangeInclusive<i32>) -> Self
Set the start and end years for the date picker. (Default: today’s year - 100 to today’s year + 10) This will limit the years you can choose from in the dropdown to the specified range.
For example, if you want to provide the range of years from 2000 to 2035, you can use:
start_end_years(2000..=2035)
.