-
-
Notifications
You must be signed in to change notification settings - Fork 735
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
Pressing enter on DayPickerInput inside a form causes submit #856
Comments
This is the desired behavior. What do you expect to happen instead? |
There is a form with a more than 10 fields. I would like to prevent users from accidentally submitting a form by hitting Enter on any field including dayPickerInput. preventDefault does not work with dayPickerInput. |
If you want to prevent a submit you should prevent the submit default event, like: <form onSubmit={e=>e.preventDefault()} /> |
Hi, i have the same issue, with another buttons. The UI buttons to swipe between months '<>' also triggers sumbit on uppers If i just inspect these buttons and adds All buttons in html are Do not force us to use e.preventDefault() on forms, casue we can need in other situations. Thx |
Similar as minor bug #443.
It's about day picker input with dropdown calendar.
Even when read-only, read-only input field could receive focus. If you press enter the form will be submited.
The text was updated successfully, but these errors were encountered: