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

Allow setMin() to adjust dateSelected when the current value is earlier than the new mininum #141

Open
jontjs opened this issue Aug 10, 2023 · 0 comments

Comments

@jontjs
Copy link

jontjs commented Aug 10, 2023

Currently if you have a picker with, for example, 2023-08-11 selected, then use setMin() to change the minimum date to 2023-08-16, an error is thrown "Out-of-range" error is thrown.

It would be useful if there was an option for setMin() to adjust the selected date to the new minimum.

I can appreciate that this may not be a desirable default, so perhaps an optional (bool)adjustSelectedIfOutOfRange argument would be better. Or a separate method altogether.

I suppose the same reasoning applies to setMax(), though I personally haven't encountered that.

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