I need to visualize a div containing all 30 days after the current one. But when javascript add a day after 1 december 2024 the result is 1 january 2025.
This is the code
var ldate = new getDate()
function updCalen(){
document.getElementById('settim').innerHTML = ""
var vday = 0 ;
for (i= 0; i < 30; i++) {
shdate.setDate(ldate.getDate() + i );
x++;
document.getElementById('settim').innerHTML += shdate + '<BR>' ;
}
}
updCalen()
I’m struggling with this problem but I can’t find how to solve it!