diff --git a/src/lib/components/Calendar.svelte b/src/lib/components/Calendar.svelte index 5088d9a..767d534 100644 --- a/src/lib/components/Calendar.svelte +++ b/src/lib/components/Calendar.svelte @@ -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;