1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -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

@@ -20,7 +20,7 @@ pub struct WidgetGallery {
#[cfg(feature = "chrono")]
#[cfg_attr(feature = "serde", serde(skip))]
date: Option<chrono::Date<chrono::Utc>>,
date: Option<chrono::NaiveDate>,
#[cfg_attr(feature = "serde", serde(skip))]
texture: Option<egui::TextureHandle>,
@@ -218,7 +218,7 @@ impl WidgetGallery {
#[cfg(feature = "chrono")]
{
let date = date.get_or_insert_with(|| chrono::offset::Utc::now().date());
let date = date.get_or_insert_with(|| chrono::offset::Utc::now().date_naive());
ui.add(doc_link_label("DatePickerButton", "DatePickerButton"));
ui.add(egui_extras::DatePickerButton::new(date));
ui.end_row();