From 0704ca9e5b9cd2f9713e463c800ba3ff59c8a2f2 Mon Sep 17 00:00:00 2001 From: marlon-erler Date: Fri, 19 Jul 2024 13:52:15 +0200 Subject: [PATCH] fix bug where calendar grid would clear --- dist/index.js | 3 +-- src/Views/Objects/calendarView.tsx | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index a5b61eaf..32326f8b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1770,12 +1770,11 @@ let monthGridCells = new State([]); dayInCalendar.subscribe((newValue) => { const newSelectedDate = new Date(newValue); - newSelectedDate.setHours(0); - newSelectedDate.setMinutes(0); const currentDate = /* @__PURE__ */ new Date(); monthGridCells.value = []; currentDate.setUTCDate(1); currentDate.setUTCMonth(newSelectedDate.getMonth()); + console.log(currentDate); for (let i = 0; i < 7; i++) { monthGridCells.value.push( /* @__PURE__ */ createElement("b", { class: "secondary ellipsis width-100" }, translation.weekdays[i]) diff --git a/src/Views/Objects/calendarView.tsx b/src/Views/Objects/calendarView.tsx index 3ac0b627..6011d3ab 100644 --- a/src/Views/Objects/calendarView.tsx +++ b/src/Views/Objects/calendarView.tsx @@ -52,8 +52,6 @@ export function CalendarView( let monthGridCells = new React.State([]); dayInCalendar.subscribe((newValue) => { const newSelectedDate = new Date(newValue); - newSelectedDate.setHours(0); - newSelectedDate.setMinutes(0); const currentDate = new Date(); monthGridCells.value = [];