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

Fix: DateInput does not default to minDate month #6646

Merged
merged 3 commits into from
Aug 11, 2024

Conversation

michaelperros
Copy link
Contributor

Fixes #5695

If you need any adjustments, please let me know. Happy to revise based on your feedback.

Thanks

@michaelperros
Copy link
Contributor Author

Sorry this has failed checks. I will revise and update

@michaelperros
Copy link
Contributor Author

Checks passed! Let me know if you need anything else here.

Additionally, I wanted to note that I found a separate bug in both the master and my pr. The bug is that when minDate is set, the selectable days in the DateInput Calendar start one day before the minDate. The expected behavior is that the selectable days would start on the minDate. Since it's happening in the master and is not directly related to my pr or this issue, I did not fix it here. I will create a new issue shortly to address it.

@rtivital
Copy link
Member

rtivital commented Aug 9, 2024

I'd prefer this logic to be a little different to avoid accidental breaking changes. It should check whether the minDate is after the current date and only if it is, use it as the default date.

@michaelperros
Copy link
Contributor Author

Good call. Code has been update. Let me know if any further tweaks are needed. Thanks

@rtivital rtivital merged commit 079cee1 into mantinedev:master Aug 11, 2024
1 check passed
@rtivital
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

The minDate in Dates should be the default date, when date is not given
2 participants