Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DST issue #6

Open
SaraivaDaniel opened this issue Oct 19, 2014 · 0 comments
Open

DST issue #6

SaraivaDaniel opened this issue Oct 19, 2014 · 0 comments

Comments

@SaraivaDaniel
Copy link

I've just encountered an error in datepicker today while working with it here in Brasil. Coincidentally, today is the first day of DST back here. So, when I select day 19/10 in the popup, the textbox displays 18/10 - I've searched around and found that the issue is actually in V8 engine, but I propose a workaround here.

I don't know how to fork and create a pull request, so I'm just posting the fix here based on current master commit 5f26ae7.

On file date.js, add following lines after line 499:

if (Number(s.substr(iD, 2)) - d.getDate() === 1) {
    d.addDays(1);
}

Basically it'll just check the day on the created Date object against the supplied string, and add one day in case it's offset because of DST issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant