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

Clicking on the arrow buttons submits the form (if the component is placed inside a form) #35

Closed
hubert-ix opened this issue Dec 1, 2022 · 2 comments

Comments

@hubert-ix
Copy link

I'm trying to use this component for an upcoming project. Everything integrates very well except for one issue:

When the component is placed inside a form, clicking on the left/right arrows (to navigate between months) submits the form. This has led to some confusing results :-)

The solution would be to either replace the button tags with some div tags, or to add a "return: false;" or "stopPropagation" when clicking on the buttons.

@probablykasper
Copy link
Owner

Thanks for the report, fixed in v2.2.4. The reason is because I used <button> without specifying type="button"

@hubert-ix
Copy link
Author

Works perfectly! Thanks for the fast commit.

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

2 participants