Closed Kristiansky closed 6 years ago
For example all dates between two dates
var startDate = new Date();
var endDate = (new Date()).setFullYear(2019);
var dates = [];
while (startDate < endDate) {
dates.push(startDate.toString())
startDate.setDate(startDate.getDate() + 1)
}
console.log(dates)
I want the periodpicker to return every day from the selected period, but currently it returns only start and end day. This is frustrating. Can you guide me how to select every day and put it in the array?