You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[EuiSuperDatePicker] Allow only certain range of dates #6021
For the Absolute panel, it should be a straight forward add as we can forward minDate & maxDate values to the underlying datepicker control.
Gets trickier with Relative options, we have an error state for invalid inputs (e.g. negative numbers) and could do something similar if the selected relative range is invalid. This leads to the question of what an invalid relative range is: does the entire range need to fall in the date range or is only an overlap okay.
Similar question with the Now tab, should it go away if the present datetime is excluded, add a message & disable the Set button, or something else?
Perhaps I'm over complicating this, and only the modification to Absolute is necessary as it could be a UX-addictive thing that exists more to help guide a user than anything else. If so, we could allow a pass-through prop targeting the absolute tab's EuiDatePicker.
@vvvprabhakar is the ability to control the selectable dates in the Absolute tab enough, or would you require the other date selection tabs to interact with the limited range?
What I am thinking is,
If users need to be restricted to select for only some 'X' days,
If we have a property like minDate and maxDate it would be super helpful
This would be very helpful in kibana/opensearchDashboard time filter on the discover page
Where if we are able to make that time range configurable via config options and SuperDatePicker take that range
Adding minDate / maxDate at the top level API for EuiSuperDatePicker, using them in the Absolute panel, and adding validation in isRangeInvalid sounds like a good approach.
if you want i will come up with a PR
Please do! If you want any help or pointers feel free to ask, that code is bit of a web.
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.
Activity
chandlerprall commentedon Jul 5, 2022
This is not supported currently.
For the Absolute panel, it should be a straight forward add as we can forward
minDate&maxDatevalues to the underlying datepicker control.Gets trickier with Relative options, we have an error state for invalid inputs (e.g. negative numbers) and could do something similar if the selected relative range is invalid. This leads to the question of what an invalid relative range is: does the entire range need to fall in the date range or is only an overlap okay.
Similar question with the Now tab, should it go away if the present datetime is excluded, add a message & disable the Set button, or something else?
Perhaps I'm over complicating this, and only the modification to Absolute is necessary as it could be a UX-addictive thing that exists more to help guide a user than anything else. If so, we could allow a pass-through prop targeting the absolute tab's EuiDatePicker.
chandlerprall commentedon Jul 7, 2022
@vvvprabhakar is the ability to control the selectable dates in the Absolute tab enough, or would you require the other date selection tabs to interact with the limited range?
vvvprabhakar commentedon Jul 10, 2022
What I am thinking is,
If users need to be restricted to select for only some 'X' days,
If we have a property like
minDateandmaxDateit would be super helpfulThis would be very helpful in kibana/opensearchDashboard time filter on the discover page
Where if we are able to make that time range configurable via config options and
SuperDatePickertake that rangevvvprabhakar commentedon Jul 10, 2022
if you want i will come up with a PR
vvvprabhakar commentedon Jul 10, 2022
As we implemented invalid date, the same way we can also implement the raneg
chandlerprall commentedon Jul 20, 2022
Adding
minDate/maxDateat the top level API for EuiSuperDatePicker, using them in the Absolute panel, and adding validation inisRangeInvalidsounds like a good approach.Please do! If you want any help or pointers feel free to ask, that code is bit of a web.
github-actions commentedon Jan 17, 2023
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.
github-actions commentedon Jan 24, 2023
❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.