1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00

Chrono update (#2397)

* limit day to last day of month if the month or year is changed

* update chrono to 0.4.23, switch to NaiveDate and remove use of deprecated functions.
This commit is contained in:
René Rössler
2022-12-06 11:42:53 +01:00
committed by GitHub
parent 9e3da91a59
commit c3932f7f7f
5 changed files with 21 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
use super::popup::DatePickerPopup;
use chrono::{Date, Utc};
use chrono::NaiveDate;
use egui::{Area, Button, Frame, InnerResponse, Key, Order, RichText, Ui, Widget};
#[derive(Default, Clone, serde::Deserialize, serde::Serialize)]
@@ -8,7 +8,7 @@ pub(crate) struct DatePickerButtonState {
}
pub struct DatePickerButton<'a> {
selection: &'a mut Date<Utc>,
selection: &'a mut NaiveDate,
id_source: Option<&'a str>,
combo_boxes: bool,
arrows: bool,
@@ -17,7 +17,7 @@ pub struct DatePickerButton<'a> {
}
impl<'a> DatePickerButton<'a> {
pub fn new(selection: &'a mut Date<Utc>) -> Self {
pub fn new(selection: &'a mut NaiveDate) -> Self {
Self {
selection,
id_source: None,