mirror of
https://github.com/storytold/egui.git
synced 2026-11-23 02:52:15 +01:00
egui_extras date picker: fix Feb 29 crash (#1571)
This commit is contained in:
1 parent
32b4781da2
commit
d3af3a6de1
1 file changed
+6
@@ -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