Skip to content

Commit

Permalink
updated onChangeMonth to handle all rollovers
Browse files Browse the repository at this point in the history
  • Loading branch information
garikAsplund committed Nov 5, 2023
1 parent 9f3cab0 commit e967c10
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/components/Calendar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
: 1
)
const newActiveDate = new Date(activeDate); // to keep it working with immutable setting, ref #20
newActiveDate.getDate() > 28 ? newActiveDate.setDate(newActiveDate.getDate() - 3) : newActiveDate;
newActiveDate.setMonth(activeDate.getMonth() + (val*multiplier));
activeDate = newActiveDate;
onMonthTransitionTrigger = null;
Expand Down

0 comments on commit e967c10

Please sign in to comment.