mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -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()
|
.changed()
|
||||||
{
|
{
|
||||||
|
popup_state.day = popup_state
|
||||||
|
.day
|
||||||
|
.min(popup_state.last_day_of_month());
|
||||||
ui.memory()
|
ui.memory()
|
||||||
.data
|
.data
|
||||||
.insert_persisted(id, popup_state.clone());
|
.insert_persisted(id, popup_state.clone());
|
||||||
@@ -106,6 +109,9 @@ impl<'a> DatePickerPopup<'a> {
|
|||||||
)
|
)
|
||||||
.changed()
|
.changed()
|
||||||
{
|
{
|
||||||
|
popup_state.day = popup_state
|
||||||
|
.day
|
||||||
|
.min(popup_state.last_day_of_month());
|
||||||
ui.memory()
|
ui.memory()
|
||||||
.data
|
.data
|
||||||
.insert_persisted(id, popup_state.clone());
|
.insert_persisted(id, popup_state.clone());
|
||||||
|
|||||||
Reference in New Issue
Block a user