Skip to content

Commit

Permalink
egui_extras date picker: fix Feb 29 crash (#1571)
Browse files Browse the repository at this point in the history
  • Loading branch information
elwerene committed May 4, 2022
1 parent 32b4781 commit d3af3a6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions egui_extras/src/datepicker/popup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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());
Expand Down

0 comments on commit d3af3a6

Please sign in to comment.