fix apply data of citydetails
This commit is contained in:
parent
19c915fdbf
commit
619c429d36
|
@ -140,13 +140,37 @@ function loadCityDetails() {
|
||||||
if (citydetails.cityInput) {
|
if (citydetails.cityInput) {
|
||||||
// Change the city input value
|
// Change the city input value
|
||||||
const cityInput = document.getElementById("cityInput");
|
const cityInput = document.getElementById("cityInput");
|
||||||
cityInput.value = сitydetails.cityInput; // Set city input
|
$("#cityInput").val(citydetails.cityInput);
|
||||||
|
// cityInput.value = сitydetails.cityInput; // Set city input
|
||||||
}
|
}
|
||||||
|
|
||||||
if (citydetails.datepickerInput) {
|
if (citydetails.datepickerInput) {
|
||||||
// Change the datepicker input value
|
console.log(citydetails.datepickerInput);
|
||||||
const datepickerInput = document.getElementById("datepicker");
|
|
||||||
datepickerInput.value = citydetails.datepickerInput; // Set datepicker input
|
$(function () {
|
||||||
|
$('#datepicker').datepicker({
|
||||||
|
closeText: "Закрыть",
|
||||||
|
prevText: "Пред",
|
||||||
|
nextText: "След",
|
||||||
|
currentText: "Сегодня",
|
||||||
|
monthNames: ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь",
|
||||||
|
"Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"],
|
||||||
|
monthNamesShort: ["Янв", "Фев", "Мар", "Апр", "Май", "Июн",
|
||||||
|
"Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"],
|
||||||
|
dayNames: ["воскресенье", "понедельник", "вторник", "среда", "четверг", "пятница", "суббота"],
|
||||||
|
dayNamesShort: ["вск", "пнд", "втр", "срд", "чтв", "птн", "сбт"],
|
||||||
|
dayNamesMin: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"],
|
||||||
|
weekHeader: "Нед",
|
||||||
|
dateFormat: "dd.mm.yy",
|
||||||
|
firstDay: 1,
|
||||||
|
isRTL: false,
|
||||||
|
showMonthAfterYear: false,
|
||||||
|
yearSuffix: ""
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#datepicker').datepicker('setDate', citydetails.datepickerInput);
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue