Difference between revisions of "DOM Calendar"

From ProgZoo
Jump to navigation Jump to search
(Created page with "<pre id='shellbody' data-qtp='clicky'></pre> ==Display a list of dates== <div class=qu data-width=300> *You can display Mon to Sunday <pre class=test> {expr:[{id:'total',prop...")
 
Line 8: Line 8:
</pre>
</pre>
<pre class=usr>
<pre class=usr>
let firstDate = new Date('2022-01-01');
let firstDate = new Date();
for(let i=0;i<6*7;i++){
for(let i=0;i<6*7;i++){
   let d = document.createElement('div');
   let d = document.createElement('div');
   d.innerText = `i`;
  let dy = new Date(firstDate.getTime() + 1000*60*60*24*i);
   document.body.append();
   d.innerText = `${dy}`;
   document.body.append(d);
}
}
</pre>
</pre>

Revision as of 18:25, 1 January 2022


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);
}