fix: Month scroll navigates by full month, not by week

Scrolling in month view was moving currentDate by 7 days, but the
grid always renders the complete month — so 4 scrolls were needed
before any visual change. Now each scroll step advances/retreats
by exactly one month (same as the prev/next buttons).
This commit is contained in:
Scarriffle
2026-04-07 21:51:15 +02:00
parent 7f92e0423c
commit b268e88d84

View File

@@ -551,8 +551,8 @@ function bindTopbar() {
const dir = e.deltaY > 0 ? 1 : -1;
if (state.currentView === 'agenda') return;
if (state.currentView === 'month') {
state.currentDate = new Date(state.currentDate);
state.currentDate.setDate(state.currentDate.getDate() + dir * 7);
const d = state.currentDate;
state.currentDate = new Date(d.getFullYear(), d.getMonth() + dir, 1);
fetchAndRender();
} else {
navigate(dir);