pub struct Calendar {
pub text: Option<String>,
pub day: Option<usize>,
pub month: Option<Month>,
pub year: Option<isize>,
pub format: Option<String>,
}
Expand description
Settings for a dialog that displays a calendar for date selection. With feature “chrono” enabled, the output will be automatically parsed into a NaiveDate.
Fields§
§text: Option<String>
The body text
day: Option<usize>
The numeric day of the month to display as the default input. If it is larger than what is possible for the selected month, it is ignored.
month: Option<Month>
The month to display as default input
year: Option<isize>
The year to display as default input
format: Option<String>
The output format for the date the user selects
Implementations§
Source§impl Calendar
impl Calendar
Sourcepub fn with_month(self, month: impl Into<Month>) -> Self
pub fn with_month(self, month: impl Into<Month>) -> Self
Set the month
Sourcepub fn with_format(self, format: impl Into<String>) -> Self
pub fn with_format(self, format: impl Into<String>) -> Self
Set the format for the returned date. The default depends on the user locale or be set with the strftime style. For example %A %d/%m/%y. Note that this feature is disabled when using the “chrono” features as it can interfere with Chrono parsing the output.
Trait Implementations§
Source§impl ZenityApplication for Calendar
impl ZenityApplication for Calendar
Auto Trait Implementations§
impl Freeze for Calendar
impl RefUnwindSafe for Calendar
impl Send for Calendar
impl Sync for Calendar
impl Unpin for Calendar
impl UnwindSafe for Calendar
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