From f1c8c394c931cf868832a0e2bb13a8312b1624e5 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Sat, 31 Aug 2024 11:59:57 +0200 Subject: [PATCH] Default scrolling payment date to first of month --- frontend/src/lib/store/scrollingTimeFrameStore.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/lib/store/scrollingTimeFrameStore.ts b/frontend/src/lib/store/scrollingTimeFrameStore.ts index 3fb370a..41eb6eb 100644 --- a/frontend/src/lib/store/scrollingTimeFrameStore.ts +++ b/frontend/src/lib/store/scrollingTimeFrameStore.ts @@ -4,6 +4,8 @@ import { type Writable, writable } from "svelte/store"; async function createStore(): Promise & { next: Function; prev: Function }> { const thism = new Date(); const lastm = new Date(); + thism.setDate(1); + lastm.setDate(1); thism.setMonth(thism.getMonth() - 1); lastm.setMonth(lastm.getMonth() - 2);