DOM Calendar

From ProgZoo
Jump to navigation Jump to search

Display a list of dates

  • You can display Mon to Sunday
{expr:[{id:'total',prop:"value"}],
 actions:[{id:'recalculate',method:"click"},{id:'quantity',value:"2"},{id:'recalculate',method:"click"},]}
let firstDate = new Date();
for(let i=0;i<6*7;i++){
  let d = document.createElement('div');
  let dy = new Date(firstDate.getTime() + 1000*60*60*24*i);
  d.innerText = `${dy}`;
  document.body.append(d);
}