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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

_getYears() should consider minDate and maxDate #34

Closed
cadeyrn opened this issue Nov 29, 2021 · 1 comment
Closed

_getYears() should consider minDate and maxDate #34

cadeyrn opened this issue Nov 29, 2021 · 1 comment

Comments

@cadeyrn
Copy link

cadeyrn commented Nov 29, 2021

Hi!

I saw that you have already implemented my last feature requests, thanks for that! After this goes so well, I have directly the next suggestion. 馃槉

Could you consider the minDate and the maxDate in your _getYears() method?

Let's say you have a maxDate of 12/23/2022. Then 2022 should be the last year you get if you click on the year in the date picker, even if laterYears has a much larger value since you can't select any date in 2023 or later anyway.

@dmuy
Copy link
Owner

dmuy commented Nov 30, 2021

Hi @cadeyrn,

I have actually considered this when implementing the minYear and maxYear configurations. But I'd also have to implement a lot of value checking when the input already has a value or when the user sets a value (in all modes: single, multiple, date range), so I put it off for now, I'll add this in the future maybe.

dmuy added a commit that referenced this issue Jun 5, 2022
- fixed bug: next calendar rendering
- fixed bug: year view error on multiple mode
- fixed bug: issue #39
- implemented #34
- added value checking (considers minDate, maxDate, minYear & maxYear)
@dmuy dmuy closed this as completed Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants