You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for (let i = 1; i <= lastDay; i++) {
if (i === new Date().getDate() && date.getMonth() === new Date().getMonth()) {
days += `<div class="today">${i}</div>`;
console.log("found current date: " + i );
} else {
console.log("adding day: " + i);
days += `<div>${i}</div>`;
}
}
Corrected:
for (let i = 1; i <= lastDay; i++) {
if (i === new Date().getDate() && date.getMonth() === new Date().getMonth()) {
days += `<div class="today">${i}</div>`;
console.log("found current date: " + i );
} else {
console.log("adding day: " + i);
days += `<div>${i}</div>`;
}
monthDays.innerHTML = days;
}
The text was updated successfully, but these errors were encountered:
this fixed the issue of February reaching 31.....but when you click on "next" icon to change from december 2020 to january 2021, the year does not change, it stays at 2020 instead of changing to 2021
Current:
Corrected:
The text was updated successfully, but these errors were encountered: