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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user