fix bug where calendar grid would clear

This commit is contained in:
marlon-erler
2024-07-19 13:52:15 +02:00
parent f1a9adae11
commit 0704ca9e5b
2 changed files with 1 additions and 4 deletions
+1 -2
View File
@@ -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])
-2
View File
@@ -52,8 +52,6 @@ export function CalendarView(
let monthGridCells = new React.State<HTMLElement[]>([]);
dayInCalendar.subscribe((newValue) => {
const newSelectedDate = new Date(newValue);
newSelectedDate.setHours(0);
newSelectedDate.setMinutes(0);
const currentDate = new Date();
monthGridCells.value = [];