Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

An incorrect date is passed when manually typing date into input element and submitting form #130

Open
turpana opened this issue Aug 11, 2018 · 1 comment
Labels

Comments

@turpana
Copy link

turpana commented Aug 11, 2018

When manually typing in the date into the input field and immediately pressing on the Enter key to submit the form, an incorrect date is passed to the onChange handler. This does not happen if I click on the submit button or continue editing the form before submitting.

@turpana
Copy link
Author

turpana commented Aug 11, 2018

I added a test on my fork which fails, but passes if you uncomment the input.simulate('blur') line:

https://github.com/turpana/react-input-calendar/blob/master/src/tests/index.js#L60

The blur event must be the difference between just pressing Enter or interacting further with the form. Hopefully that makes it a little clearer what the cause of the issue is.

@Rudeg Rudeg added the bug label Nov 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants