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