Something I had to do in the devtools console yesterday:
/* temp0 was the result of choosing "Use in Console" on a <input> in a datepicker's month header */
let i = /* number of months since I was born*/
function f() { temp0. click(); while (--i != 0) setTimeout(f, 0) }
f()