[EuiDatePicker] Fix `utcOffset` prop not affecting the underlying `react-datepicker` lib
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
FWIW, utcOffset is from react-datepicker, but it was removed from the API in a version more recent than the EUI fork.
👋 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.
+1 - is there another known way to display times in a different TZ from the user's browser TZ?
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())
👋 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.
👋 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.
❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.
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.
bump x2, how do we display time in anything other than the local timezone.
Thanks all for the bumps - going to go ahead and re-open this and mark it as a bug.
👋 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.
bump x 4
👋 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.
Closing this old issue as it has gone stale. Feel free to re-open it if you feel it is still important.