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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user