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 input direct edit of date guesses timezone #7671

Open
marsh73 opened this issue Apr 10, 2024 · 3 comments
Open

EuiDatePicker input direct edit of date guesses timezone #7671

marsh73 opened this issue Apr 10, 2024 · 3 comments
Labels
bug help wanted The EUI team is looking for community members to pick up and implement this issue

Comments

@marsh73
Copy link

marsh73 commented Apr 10, 2024

Describe the bug
When using DatePicker with UTC date, If I select a time change from the dropdown it behaves as expected, but when I edit the date directly, it automatically adjusts the date to UTC in the dropdown, then in the actual date, once I click away. This feels like a bug. If it were deliberate i would expect that the same adjustment would be made when selecting a time from the dropdown.

it seems to assume when selecting from the dropdown that I know what I'm doing, but when manually entering the time, it has to make an adjustment for me. I went to your storybook examples for the utcOffset to see if it was my code or the component itself.

if you go here https://eui.elastic.co/#/forms/date-picker#utc-offsets
select a time from the dropdown
you'll see the time behaves as expected
manually update the time by 1 minute
you will see that when you click away it adjusts the hours to account for the offset.
this is a confusing behavior

Impact and severity
It's a confusing UX that can make it hard to create an exact search

Environment and versions
bypassing this as you can recreate in your current storybook in your docs

To Reproduce
Steps to reproduce the behavior:

  1. go here https://eui.elastic.co/#/forms/date-picker#utc-offsets
  2. select a time from the dropdown => you'll see the time behaves as expected
  3. manually update the time by 1 minute => you will see that when you click away it adjusts the hours to account for the offset.

this is a confusing behavior

Expected behavior
editing the time input manually would behave as selecting a time input from the list... what i see, is what persists

Minimum reproducible sandbox
It is extremely helpful for us if you are able to reproduce your issue in a minimum reproducible sandbox (visit our docs site and click the CodeSandbox logo in the top-right corner).

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@marsh73 marsh73 added bug ⚠️ needs validation For bugs that need confirmation as to whether they're reproducible labels Apr 10, 2024
@JasonStoltz JasonStoltz added help wanted The EUI team is looking for community members to pick up and implement this issue and removed ⚠️ needs validation For bugs that need confirmation as to whether they're reproducible labels Apr 16, 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

Hey @marsh73, thank you for the bug report. Since we're not really using these UTC offsets in Elastic products, we decided that we're not going to prioritize a fix at this time. However, we are always super grateful for community PRs.

@marsh73
Copy link
Author

marsh73 commented Apr 26, 2024

Thank you... if i can find a solution I'll submit a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 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