Skip to content
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
Closed
@danilloborges

Description

@danilloborges

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions