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

The minDate in Dates should be the default date, when date is not given #5695

Open
1 of 2 tasks
leonschwanitz opened this issue Feb 1, 2024 · 0 comments · May be fixed by #5786
Open
1 of 2 tasks

The minDate in Dates should be the default date, when date is not given #5695

leonschwanitz opened this issue Feb 1, 2024 · 0 comments · May be fixed by #5786
Labels
help wanted Contributions from community are welcome

Comments

@leonschwanitz
Copy link

leonschwanitz commented Feb 1, 2024

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.5.1

What package has an issue?

@mantine/dates

What framework do you use?

Next.js

In which browsers you can reproduce the issue?

Chrome

Describe the bug

When the DateInput property (minDate) is set to, for example, 2024-09-01, and the DateInput is controlled through the form but the date is undefined, I expect the calendar to automatically navigate to the correct month of the minDate. It can be confusing for the user when the min date is in the future (and the month is greyed out). Additionally, the defaultDate does not work properly when using the mantine/forms plugin.

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

No response

Possible fix

Start the default month (date) with the minDate given.

Self-service

  • I would be willing to implement a fix for this issue
@rtivital rtivital added the help wanted Contributions from community are welcome label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions from community are welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants