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

[@mantine/dates] DateInput does not close date picker or properly format the date on Enter key press #7279

Open
1 of 2 tasks
przemekciacka opened this issue Dec 18, 2024 · 0 comments

Comments

@przemekciacka
Copy link

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

7.11.1

What package has an issue?

@mantine/dates

What framework do you use?

Vite

In which browsers you can reproduce the issue?

Chrome

Describe the bug

When using the DateInput component, pressing the Enter key after typing a date does nothing. When the component is embedded inside a <form>, this creates a problem where the form gets submitted, but the date picker remains visible. Furthermore, if I then click on another DateInput, the previous date picker does not disappear (see attached video for reference).

Nagranie.z.ekranu.2024-12-18.o.14.56.13.mov

It would be great if pressing the Enter key on the DateInput could:
1. Properly format the entered date.
2. Close the date picker.

If possible, include a link to a codesandbox with a minimal reproduction

https://codesandbox.io/p/sandbox/mantine-date-input-on-enter-5zwcxn

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this 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