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

[EuiDatePicker] Display error for minDate and maxDate #2816

Closed
tabna opened this issue Feb 1, 2020 · 0 comments · Fixed by #5069
Closed

[EuiDatePicker] Display error for minDate and maxDate #2816

tabna opened this issue Feb 1, 2020 · 0 comments · Fixed by #5069
Labels

Comments

@tabna
Copy link

tabna commented Feb 1, 2020

In the date picker, if you set a minDate and maxDate, the < > controls enable and disable appropriately, but the Month and Year controls do not.

For example, in the demo shown in the documentation, the min/max is currently set to a one week time span, 1/20/2020 - 2/6/2020. If you click on '2020' in the calendar header, it displays a blank screen where normally you would see the year choices. At the very least, it should display all allowed years within the min/max - in this case, just 2020. What would be better is that if only the current year is allowed, the '2020' link is disabled.

Also in the demo, if you click on the Month, you get a screen showing all month choices. You should only see months within the allowed range. If the range spans multiple years, you'd still see all months, but in the demo it only spans two months of one year, so you should only see January and February.

Because of this, I am able to select a date not in the range by clicking on 'February', then clicking on 'May', which because today was the 1st, populates the input with 5/1/2020, well outside of the range.

@thompsongl thompsongl added the bug label Sep 18, 2020
@cchaos cchaos changed the title Display error for date picker minDate and maxDate [EuiDatePicker] Display error for minDate and maxDate Sep 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants