brianblakely/nodep-date-input-polyfill

Wrong date when clicking date

Closed this issue · 4 comments

When I click on a day the input field gets set with the clicked day -1, i.e. click 29, but 28 is entered. Same when clicking the 'Today' button.

When using up and down arrows it does get the correct date.

This seams fixed can you confirm by getting the most recent version

I have version 2.4.6 and this is still happening, the timezone doesn't seem to accounted for by the toISOString call in valueAsDate?

https://github.com/brianblakely/nodep-date-input-polyfill/blob/master/input.js#L29

@jonnywyatt

the timezone doesn't seem to accounted for by the toISOString call in valueAsDate?

This is intentional. The standard behavior does not account for timezone. Compare to Chrome's behavior here, which supports the date input natively.

@TheDude70

I'm not experiencing any issues with wrong dates via clicks. A live example would help greatly, but I will continue to investigate.

Still cannot reproduce. Please file a new issue with an example, if you are still experiencing this.