From 37a0c52464a8fae35320969eef24054a48572a1c Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Mon, 19 Aug 2024 13:09:06 +0200 Subject: [PATCH] Fix scrolling in frame --- frontend/src/lib/store/scrollingTimeFrameStore.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/store/scrollingTimeFrameStore.ts b/frontend/src/lib/store/scrollingTimeFrameStore.ts index 9ff08f3..f9d0b4e 100644 --- a/frontend/src/lib/store/scrollingTimeFrameStore.ts +++ b/frontend/src/lib/store/scrollingTimeFrameStore.ts @@ -6,7 +6,7 @@ async function createStore(): Promise & { next: Fun const lastm = new Date(); lastm.setMonth(thism.getMonth() - 1); - const { subscribe, update, set } = writable({ from: thism, to: lastm }); + const { subscribe, update, set } = writable({ from: lastm, to: thism }); return { subscribe, update, @@ -14,14 +14,14 @@ async function createStore(): Promise & { next: Fun next: () => { update((frame: ScrollingTimeframe) => { frame.from.setMonth(frame.from.getMonth() + 1); - frame.to.setMonth(frame.from.getMonth() + 1); + frame.to.setMonth(frame.to.getMonth() + 1); return frame; }); }, prev: () => { update((frame: ScrollingTimeframe) => { frame.from.setMonth(frame.from.getMonth() - 1); - frame.to.setMonth(frame.from.getMonth() - 1); + frame.to.setMonth(frame.to.getMonth() - 1); return frame; }); },