var range = getDates(new Date(), new Date().addDays(7));
I\'d like \"range\" to be an array of date objects, one for each day between the two dates
I use this function
function getDatesRange(startDate, stopDate) { const ONE_DAY = 24*3600*1000; var days= []; var currentDate = new Date(startDate); while (currentDate <= stopDate) { days.push(new Date (currentDate)); currentDate = currentDate - 1 + 1 + ONE_DAY; } return days; }