From 7803cb741b53d353e2ebed76fbc92c0b617bd23a Mon Sep 17 00:00:00 2001 From: andrewlalis Date: Mon, 29 Sep 2025 16:18:09 -0400 Subject: [PATCH] Fixed date range functions. --- app/src/apps/classroom_compliance/EntriesTable.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/apps/classroom_compliance/EntriesTable.vue b/app/src/apps/classroom_compliance/EntriesTable.vue index e3ef4e0..8d6c755 100644 --- a/app/src/apps/classroom_compliance/EntriesTable.vue +++ b/app/src/apps/classroom_compliance/EntriesTable.vue @@ -133,8 +133,7 @@ async function showThisWeek() { const today = new Date() today.setHours(0, 0, 0, 0) // First set the to-date to the next upcoming end-of-week (Friday). - toDate.value = new Date() - toDate.value.setHours(0, 0, 0, 0) + toDate.value = new Date(today) if (today.getDay() >= 1 && today.getDay() <= 5) { // If we're anywhere in the week, shift up to Friday. const dayDiff = 5 - today.getDay() @@ -149,7 +148,7 @@ async function showThisWeek() { } // Then set the from-date to the Monday of that week. - fromDate.value = new Date() + fromDate.value = new Date(today) fromDate.value.setHours(0, 0, 0, 0) fromDate.value.setDate(toDate.value.getDate() - 4) await loadEntries()