1.1.51 upd the local time check of the selected city

This commit is contained in:
2024-08-01 10:22:44 +03:00
parent 822a029104
commit 1301af9d84
2 changed files with 17 additions and 6 deletions

View File

@@ -148,18 +148,24 @@ function init_departure_DT() {
if (!place_1) return;
let hiddenTime = document.querySelector('.local_city_time').innerText;
let startDate;
let startDate = null;
if(hiddenTime){
if (window.location.href.includes("/ru/")) {
if (window.location.href.includes("/ru/")) {
startDate = moment(hiddenTime, "D MMMM YYYY г. HH:mm", 'ru');
} else {
startDate = moment(hiddenTime, "D MMMM YYYY г. HH:mm", 'ru');
startDate = moment(hiddenTime, "MMMM D, YYYY, h:mm a", 'en');
}
} else {
startDate = moment(hiddenTime, "MMMM D, YYYY, h:mm a", 'en');
startDate = moment()
}
$(place_1).daterangepicker({
"autoapply": true,
"linkedCalendars": false,