DateTime component not displaying the correct date after selection

I have a situation where the timeZoneId in session props and device/timeZone/Id in session props are different. What decides the timeZoneId in session props?

Hence, when I click a date in the dateTime component the previous day’s date gets selected.
Is there any way to overcome this?

The Designer decides the timeZoneId value, and thus can sort of force sessions into behaving as if they were all using a specific timezone. However, we have no control over the true timezone of a device, and so device.timeZone.id should be understood as a read-only property to give you insight into what timezone the user is actually in. So there should be no interference in the properties. If you are having trouble with dates, you either need to allow a user to select a different day and account for the tie difference, or you need to force their session into using a certain timezone.

1 Like

How can this be achieved?

By setting the session timezone to a value of your choosing.

1 Like