8.4.2 time zones, locales, datetime mess
I have 2 datetime widgets:
The site (server, system) is on a Moscow time zone.
When Russian language is selected, the widgets show the dates in the Russian format, i.e. 05.11.2018 and say 30.11.2018.
Controller compares the two:
It works fine in Russian. The $pickup and $dropoff are set by ajax as
'pickup': $('#pickup_dt_dt_pub').val(), 'dropoff': $('#dropoff_dt_dt_pub').val(
But when I change the language to English, the widgets show the dates as 11/05/2018. When I click on the date, it shown May as the month. If I pick 05 and 30 Nov: the first one is shown as 05/11/2018 and the second as 30/05/2018, the controller returns the error because the 2nd time is less than the 1st. Looks like the widget swaps days and months in English.
How should I set the tomorrow's datetime to make sure it works properly in both languages?
How do I force the widget to show dates as picked without swapping days and months?
The widget should be set as
and the value in jQuery should be checked as
Now the returned values are always in the same format Y-m-d regardless of the language.