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] Fix utcOffset prop not affecting the underlying react-datepicker lib #3461

Open
thompsongl opened this issue May 11, 2020 · 11 comments
Labels
bug help wanted The EUI team is looking for community members to pick up and implement this issue low hanging fruit An issue, often a bug, that is lower effort and clearly ought to be fixed

Comments

@thompsongl
Copy link
Contributor

After reviewing #3436, it doesn't appear that the utcOffset prop in EuiDatePicker does what it says/what we think.

In the docs, the actual UTC offset is done on selected value itself:

const selected =
this.state.startDate &&
this.state.startDate.clone().utcOffset(this.state.utcOffset);

And passing just the offset value via the utcOffset prop has no effect.

As such, simply passing through utcOffset to EuiSuperDatePicker also has no effect.

There are 0 usages in Kibana so it's hard to track correct usage and output.

Originally posted by @thompsongl in #3433 (comment)

@thompsongl thompsongl added the ⚠️ needs validation For bugs that need confirmation as to whether they're reproducible label May 11, 2020
@thompsongl
Copy link
Contributor Author

FWIW, utcOffset is from react-datepicker, but it was removed from the API in a version more recent than the EUI fork.

@cchaos cchaos changed the title Investigate utcOffset prop in EuiDatePicker [EuiDatePicker] Investigate utcOffset prop Sep 20, 2020
@github-actions
Copy link

👋 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.

@elyngved
Copy link

+1 - is there another known way to display times in a different TZ from the user's browser TZ?

@thompsongl
Copy link
Contributor Author

is there another known way to display times in a different TZ from the user's browser TZ?

Currently you'd need to mimic the code snippet above and use moment manipulation (.utcOffset())

@github-actions
Copy link

👋 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
Copy link

👋 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
Copy link

❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.

@doug-the-guy
Copy link

BUMP. I'm very interested in being able to apply utcOffset to all dates in the EuiDatePicker/EuiSuperDatePicker as all of the data in my application uses UTC.

@sokryptk
Copy link

bump x2, how do we display time in anything other than the local timezone.

@cee-chen
Copy link
Member

Thanks all for the bumps - going to go ahead and re-open this and mark it as a bug.

@cee-chen cee-chen added bug good first issue and removed stale-issue stale-issue-closed ⚠️ needs validation For bugs that need confirmation as to whether they're reproducible labels Sep 24, 2024
@cee-chen cee-chen reopened this Sep 24, 2024
@cee-chen cee-chen changed the title [EuiDatePicker] Investigate utcOffset prop [EuiDatePicker] Fix utcOffset prop not affecting the underlying react-datepicker lib Sep 24, 2024
@cee-chen cee-chen added low hanging fruit An issue, often a bug, that is lower effort and clearly ought to be fixed and removed good first issue labels Sep 24, 2024
@JasonStoltz JasonStoltz added the help wanted The EUI team is looking for community members to pick up and implement this issue label Sep 24, 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.

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 low hanging fruit An issue, often a bug, that is lower effort and clearly ought to be fixed
Projects
None yet
Development

No branches or pull requests

7 participants