This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.
[Datepicker] duplicate days #1196
Closed
Description
no mês de outubro aparecem dias duplicados (daylight saving?)
this code solve my problem:
function getDates(startDate, n) {
var dates = new Array(n);
var current = startDate, i = 0;
while (i < n) {
dates[i++] = new Date(current);
current.setDate( current.getDate() + 1 );
// hack: daylight saving
if(current.getDay() == dates[i - 1].getDay()) current.setDate( current.getDate() + 1 );
}
return dates;
}
Metadata
Metadata
Assignees
Labels
No labels