mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
egui_extras date picker: fix Feb 29 crash (#1571)
This commit is contained in:
@@ -86,6 +86,9 @@ impl<'a> DatePickerPopup<'a> {
|
||||
)
|
||||
.changed()
|
||||
{
|
||||
popup_state.day = popup_state
|
||||
.day
|
||||
.min(popup_state.last_day_of_month());
|
||||
ui.memory()
|
||||
.data
|
||||
.insert_persisted(id, popup_state.clone());
|
||||
@@ -106,6 +109,9 @@ impl<'a> DatePickerPopup<'a> {
|
||||
)
|
||||
.changed()
|
||||
{
|
||||
popup_state.day = popup_state
|
||||
.day
|
||||
.min(popup_state.last_day_of_month());
|
||||
ui.memory()
|
||||
.data
|
||||
.insert_persisted(id, popup_state.clone());
|
||||
|
||||
Reference in New Issue
Block a user