eui icon indicating copy to clipboard operation
eui copied to clipboard

[EuiDatePicker] Fix `utcOffset` prop not affecting the underlying `react-datepicker` lib

Open thompsongl opened this issue 6 years ago • 14 comments

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:

https://github.com/elastic/eui/blob/12074a5827c27500ade1747661c59608b0980cf6/src-docs/src/views/date_picker/utc.js#L43-L45

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 https://github.com/elastic/eui/issues/3433#issuecomment-625526431

thompsongl avatar May 11 '20 20:05 thompsongl

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

thompsongl avatar May 11 '20 22:05 thompsongl

👋 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[bot] avatar Mar 20 '21 00:03 github-actions[bot]

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

elyngved avatar Jun 11 '21 15:06 elyngved

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())

thompsongl avatar Jun 14 '21 15:06 thompsongl

👋 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[bot] avatar Dec 11 '21 16:12 github-actions[bot]

👋 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[bot] avatar Jun 11 '22 16:06 github-actions[bot]

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

github-actions[bot] avatar Jun 18 '22 16:06 github-actions[bot]

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.

doug-the-guy avatar Mar 15 '24 16:03 doug-the-guy

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

sokryptk avatar Sep 21 '24 11:09 sokryptk

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

cee-chen avatar Sep 24 '24 00:09 cee-chen

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

github-actions[bot] avatar Sep 24 '24 16:09 github-actions[bot]

bump x 4

ashokaditya avatar Nov 21 '24 15:11 ashokaditya

👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed.

github-actions[bot] avatar Sep 22 '25 00:09 github-actions[bot]

Closing this old issue as it has gone stale. Feel free to re-open it if you feel it is still important.

JasonStoltz avatar Dec 15 '25 20:12 JasonStoltz