Date picker with timezone selection

Is your feature request related to a problem? Please describe.
We are experience some difficultly when working with Date picker on DatoCMS. Basically there are some record we wanted to show the date in a different time zone.

Take for example we have a list of records about our event.

The event date will be based on the city/country timezone. Eg, event in Singapore, London and Italy. We have configured the timezone in the system is Singapore timezone.

So when I set the value for the date picker for the event in London, there are no way for me to specify London timezone. It will always take the Singapore timezone as the value so that the value that I expected was not correct.

We wanted to have a way to specify the timezone for the date picker.

Describe the solution you’d like
Could you please add a timezone selection in the date picker by default or has an option when create the date picker to has timezone selection?

Describe alternatives you’ve considered

Additional context
I sent an email to Matteo and below was his suggestions.

Meanwhile, I can offer you a couple of workarounds:
- set the date as if there weren't timezones and deal with the representation in the frontend
- use three fields, one per timezone so that you don't get confused
- add a timezone field using the number field so that you can have the time in UTC and then add the timezone accordingly

I still couldn’t wrap my head around these solutions and how they are going to work together.

For example I have an event on 13 Aug 2019, 9AM London time.

If my website was configured as Singapore timezone (+8). When I set the date as 13 Aug 2019, 9AM. It will understand in +8 Timezone and when I check the graphql, I received
2019-08-13T01:00:00.000Z. Meaning the input was wrong, it is not what I expected to received.

I wanted to received 2019-08-13T03:00:00.000Z or 2019-08-13T09:00:00.000+02:00

And as Matteo suggestion, when I received 2019-08-13T01:00:00.000Z. How do I use this value combine with the another timezone to get the correct value. I don’t think there is a way because the input was basically wrong.

Related to: Better Date Picker / localize date settings

We also have a huge need to be able to select a timezone when inputting a date in the date/time picker.

In our case, we run events online, and the people creating the events in Dato won’t also be in the same timezone as the audience for our events, so using the editor/site timezone just causes added confusion. When an editor who lives in e.g. Melbourne Australia (our site is set to Australia/Melbourne) needs to create an event intended for audiences in Pacific Time, they’ll need to convert the event starting time back to their local timezone in order to add the event, and then we need to convert the event time back to the intended timezone in our front end code.

We also then don’t have a way of tracking which timezone the event is actually intended to display in, short of hardcoding, or pre-populating our own timezone dropdown.

In short, we’d love to get an (optional?) timezone attribute to the date time picker that overrides the site/user timezone.

This seems to have appeared, which is very exciting thankyou!

1 Like
1 Like