This commit is contained in:
Lani Aung
2024-08-17 21:25:39 -06:00
parent ddd68a3eae
commit 47452028ba
+3 -3
View File
@@ -216,13 +216,13 @@
const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
function setCalendars() { function setCalendars() {
const existing = main.querySelectorAll(".calendar");
for (const item of existing) item.remove();
const date = new Date(); const date = new Date();
date.setHours(0, 0, 0); date.setHours(0, 0, 0);
if (date.getDate() == today.getDate() && displayed) return; if (date.getDate() == today.getDate() && displayed) return;
const existing = main.querySelectorAll(".calendar");
for (const item of existing) item.remove();
for (let year = today.getFullYear(); year < (today.getFullYear() + 5); year++) { for (let year = today.getFullYear(); year < (today.getFullYear() + 5); year++) {
date.setFullYear(year); date.setFullYear(year);