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 more years than a range of +- 7 years #7869

Closed
vera opened this issue Jul 2, 2024 · 5 comments
Closed

EuiDatePicker: display more years than a range of +- 7 years #7869

vera opened this issue Jul 2, 2024 · 5 comments
Labels
feature request help wanted The EUI team is looking for community members to pick up and implement this issue

Comments

@vera
Copy link

vera commented Jul 2, 2024

Is your feature request related to a problem? Please describe.

I think the user experience when changing the year in the EuiDatePicker is not ideal. Currently, only a range of +- 7 years of the currently selected year is available when changing the year:

image

This is cumbersome when I want to select a year much further in the past or future. I don't see any option to increase that range (please correct me if I'm wrong.)

Describe the solution you'd like

I would like an easier way to select years far in the past or future. Ideally, it should just be possible to "infinitely" scroll up and down in the year selection dropdown (maybe using virtual scrolling).

Additional context

I found another solution to the problem suggested in a related old issue (#4047):

May I suggest to use the left/right arrow in the calendar header to change the range of year instead of using scrollbar to keep the same user interaction? So the calendar would be 2013 - 2027 (based on current year) and clicking on the left and right arrow would decrement/increment the year range by 15 respectively?

However, I would prefer to simply extend the scroll range and that issue was closed due to inactivity.

@JasonStoltz
Copy link
Member

Hey @vera, this looks like a valid concern. I think on our end we'll need to determine what an optimal solution would be here.

@JasonStoltz
Copy link
Member

We're marking this as "Low" priority for now. We need to figure out how many users in Elastic this impacts before we're able to commit to addressing this.

In the meantime, we're adding a "help wanted" label, because we would accept a PR for this one.

@JasonStoltz JasonStoltz added the help wanted The EUI team is looking for community members to pick up and implement this issue label Jul 15, 2024
Copy link

👋 Thank you for your suggestion or request! While the EUI team agrees that it's valid, it's unlikely that we will prioritize this issue on our roadmap. We'll leave the issue open if you or anyone else in the community wants to implement it by contributing to EUI. If not, this issue will auto close in one year.

@JasonStoltz
Copy link
Member

I think most typically at Elastic we're dealing with log data, which tends to fall within the available time frame, which is why this hasn't come up before. May I ask what type of data you are dealing with / what your use case is?

@JasonStoltz
Copy link
Member

Alright, it turns out this is already supported.

This is actually not documented super well in our documentation, but the yearDropdownItemNumber lets you configure the number of options shown in that dropdown. So for instance, if you want to increase the window by a large amount, you could pass yearDropdownItemNumber={50}, etc. to increase the number.

@JasonStoltz JasonStoltz closed this as not planned Won't fix, can't repro, duplicate, stale Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request help wanted The EUI team is looking for community members to pick up and implement this issue
Projects
None yet
Development

No branches or pull requests

2 participants