Date Picker acting strange #2441
-
Hi guys, I am having an issue with date picker not showing the right local time. The date picker time is 2 hours behind. I tried using formulas on a normal text field and the date is showing correctly. `v1(data) { return data.prefill =formatted_date; Is this a known issue with the date picker? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
@Rodien Thanks - and awesome that you're already experimenting with Formulas. We actually haven't fully tested the date/time formulas yet, so this may be an issue. I believe our goal is make a change that dates will be as date-time object (not as strings) whichs should then fix this. But it probably means that the input/output format may still need to change in the date-formulas. For now, could you check if it would be fixed if you return the date-string as Zulu time? |
Beta Was this translation helpful? Give feedback.
-
Date picker uses UTC time as a string and you are giving it your local time. So you local time is converted to UTC. This code will give you correct result until we work out DateTime as an object:
|
Beta Was this translation helpful? Give feedback.
-
We'll try to address this asap. |
Beta Was this translation helpful? Give feedback.
-
Just fyi: in the end it must be the right time on UTC, not on the local PC. You can fiddle with TimeZoneOffset to fix that or something like this:
|
Beta Was this translation helpful? Give feedback.
-
Note in v12.02 we are making date-formulas easier.
See latest docs http://r.2sxc.org/formulas I also documented in detail how the dates behave, and how to parse an existing date (dropping the Z) to ensure it's easy to work with. |
Beta Was this translation helpful? Give feedback.
Note in v12.02 we are making date-formulas easier.
See latest docs http://r.2sxc.org/formulas
I also documented in detail how the dates behave, and how to parse an existing date (dropping the Z) to ensure it's easy to work with.