This commit is contained in:
2023-09-23 14:54:12 +03:00
parent 573b8ec0c3
commit 84620e74f8
4 changed files with 44 additions and 24 deletions

View File

@@ -843,13 +843,13 @@
/*}*/
.from_address_point_txt.find_route.first{
border-top: 1px solid #E6E6E6;
border-top: 1px solid #E6E6E6;
border-right: 0;
border-bottom: 1px solid #E6E6E6;
border-left: 1px solid #E6E6E6;
display: block;
height: 20px;
width: 58.1%;
width: 55.1%;
float: left;
background-image: none !important;
margin-top: 0;
@@ -864,7 +864,7 @@
border-left: 1px solid #E6E6E6;
display: block;
height: 20px;
width: 58.1%;
width: 55.1%;
border-radius: 0;
float: left;
background-image: none !important;
@@ -956,7 +956,7 @@
display: inline-block;
float: right;
width: 29%;
height: 97%;
height: 95%;
border-top: 1px solid #E6E6E6;
border-right: 1px solid #E6E6E6;
border-bottom: 1px solid #E6E6E6;

View File

@@ -111,12 +111,6 @@ function forloop_func_form (data,get,str) {
}
}else if (name_el === "regervation"){
let departure_DT = list_of_elements_form[i].dataset['departure_DT']
let arrival_DT = list_of_elements_form[i].dataset['arrival_DT']
data['departure_DT'] = departure_DT
data['arrival_DT'] = arrival_DT
str = `${str}departure_DT=${departure_DT}&arrival_DT=${arrival_DT}&`
} else {
let name_el = name_attr.value
data[name_el] = value_el

View File

@@ -45,21 +45,47 @@
// });
$(function() {
$('#regervation').daterangepicker({
let place_1 = document.querySelector("#id_arrival_DT")
$(place_1).daterangepicker({
"autoapply": true,
"linkedCalendars": false,
},
function(start, end, label) {
// $('#displayRegervation').text('Registration date is: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));
$('#regervation')[0].dataset['departure_DT'] = start.format('YYYY-MM-DD');
$('#regervation')[0].dataset['arrival_DT'] = end.format('YYYY-MM-DD');
// $('#regervation')[0].dataset['departure_DT'] = start.format('YYYY-MM-DD');
// $('#regervation')[0].dataset['arrival_DT'] = end.format('YYYY-MM-DD');
});
$('.drp-calendar.right').hide();
$('.drp-calendar.left').addClass('single');
$(`${place_1.id} .drp-calendar.right`).hide();
$(`${place_1.id} .drp-calendar.left`).addClass('single');
$('.calendar-table').on('DOMSubtreeModified', function() {
var el = $(".prev.available").parent().children().last();
$(`${place_1.id} .calendar-table`).on('DOMSubtreeModified', function() {
var el = $(`${place_1.id} .prev.available`).parent().children().last();
if (el.hasClass('next available')) {
return;
}
el.addClass('next available');
el.append('<span></span>');
});
});
$(function() {
let place_1 = document.querySelector("#id_departure_DT")
$(place_1).daterangepicker({
"autoapply": true,
"linkedCalendars": false,
},
function(start, end, label) {
// $('#displayRegervation').text('Registration date is: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));
// $('#regervation')[0].dataset['departure_DT'] = start.format('YYYY-MM-DD');
// $('#regervation')[0].dataset['arrival_DT'] = end.format('YYYY-MM-DD');
});
$(`${place_1.id} .drp-calendar.right`).hide();
$(`${place_1.id} .drp-calendar.left`).addClass('single');
$(`${place_1.id} .calendar-table`).on('DOMSubtreeModified', function() {
var el = $(`${place_1.id} .prev.available`).parent().children().last();
if (el.hasClass('next available')) {
return;
}