Expand description
egui-datepicker adds a simple date picker widget. Checkout the example
use eframe::egui::Ui;
use chrono::prelude::*;
use std::fmt::Display;
use egui_datepicker::DatePicker;
struct App<Tz>
where
Tz: TimeZone,
Tz::Offset: Display,
{
date: chrono::Date<Tz>
}
impl<Tz> App<Tz>
where
Tz: TimeZone,
Tz::Offset: Display,
{
fn draw_datepicker(&mut self, ui: &mut Ui) {
ui.add(DatePicker::new("super_unique_id", &mut self.date));
}
}
Structs§
- Date
Deprecated - ISO 8601 calendar date with time zone.
- Date
Picker - Default values of fields are:
- Fixed
Offset - The time zone with fixed offset, from UTC-23:59:59 to UTC+23:59:59.
- Local
- The local timescale.
- Utc
- The UTC time zone. This is the most efficient time zone when you don’t need the local time. It is also used as an offset (which is also a dummy type).