Fixed Date pickers take me back in time

ichpen

Well-known member
Affected version
2.1.5
So this is cute. Discovered by accident when trying to figure out an issue with @NixFifty and thought it was his addon but seems to be a universal datepicker problem.

This happens on multiple PCs and Android devices in Chrome and Opera. I am in Eastern Time Zone. Changing the day entry in a date input box manually and tabbing (or clicking out) subtracts a day. See attached vid for an actual demo. I'm simply tabbing out of that field. Using the datepicker itself is currently the workaround as that seems to stick the date properly.

Temporarily changing my client timezone on my client machine (Windows in my case) from ET to UTC fixes this. Obviously not a tenable solution long term :) but strongly suspect timezone related.

 
Last edited:
I noticed this issue as well, but in my case even if using the datepicker.

Ideally it would be nice to be able to force UTC in the template code:

1576805262186.webp
 
I'm going to mark this is fixed but as I alluded to above, it has been fixed in XF 2.2.

Significantly (and I think @Jake B. will want advance notice of this, at least) we've moved Pikaday to a more up-to-date fork. This up-to-date fork does not currently include the time picker which we previously included from another fork but did not explicitly enable.

Because this is essentially a breaking change, this is why we are saving this relatively simple fix until XF 2.2.

If you're making use of the timepicker currently then we suggest making alternative arrangements.

Some ideas would include continuing to use the existing date/time picker code and access it via a custom element handler, using a simple HTML input for time selection or using a different date/time picker entirely.
 
Hi Chris,

Were you able to look at the UTC issue. Meaning if we pick a date, is that date relative to the users time zone or UTC?

Thank you.
 
Top Bottom