0.0.265
This commit is contained in:
@@ -43,23 +43,23 @@
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
function init_arrival_DT (){
|
||||
|
||||
$(function () {
|
||||
let onl_param = ""
|
||||
if (window.location.href === "http://localhost:8016/ru/profile/page/create_route_for_mover/" || window.location.href === "http://localhost:8016/ru/profile/page/create_route_for_customer/"){
|
||||
onl_param = "singleDatePicker: true"
|
||||
onl_param = "singleDatePicker"
|
||||
}
|
||||
let place_1 = document.querySelector("#id_arrival_DT")
|
||||
if (place_1) {
|
||||
$(place_1).daterangepicker({
|
||||
"autoapply": true,
|
||||
"linkedCalendars": false,
|
||||
|
||||
"singleDatePicker":true
|
||||
},
|
||||
function (start, end, label) {
|
||||
|
||||
// $('#displayRegervation').text('Registration date is: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));
|
||||
$('#id_arrival_DT').val(start.format('DD.MM.YYYY') + " - " + end.format('DD.MM.YYYY'))
|
||||
$('#id_arrival_DT').val(start.format('DD.MM.YYYY'))
|
||||
});
|
||||
|
||||
$(`${place_1.id} .drp-calendar.right`).hide();
|
||||
@@ -74,7 +74,76 @@ $(function () {
|
||||
el.append('<span></span>');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function init_departure_DT (){
|
||||
|
||||
let place_1 = document.querySelector("#id_departure_DT")
|
||||
let onl_param = ""
|
||||
if (window.location.href === "http://localhost:8016/ru/profile/page/create_route_for_mover/" || window.location.href === "http://localhost:8016/ru/profile/page/create_route_for_customer/"){
|
||||
onl_param = "singleDatePicker"
|
||||
}
|
||||
if (place_1) {
|
||||
$(place_1).daterangepicker({
|
||||
"autoapply": true,
|
||||
"linkedCalendars": false,
|
||||
"singleDatePicker":true
|
||||
},
|
||||
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');
|
||||
$('#id_departure_DT').val(start.format('DD.MM.YYYY'))
|
||||
|
||||
});
|
||||
|
||||
$(`${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;
|
||||
}
|
||||
el.addClass('next available');
|
||||
el.append('<span></span>');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$(function () {
|
||||
let onl_param = ""
|
||||
if (window.location.href === "http://localhost:8016/ru/profile/page/create_route_for_mover/" || window.location.href === "http://localhost:8016/ru/profile/page/create_route_for_customer/"){
|
||||
onl_param = "singleDatePicker: true"
|
||||
}
|
||||
let place_1 = document.querySelector("#id_arrival_DT")
|
||||
if (place_1) {
|
||||
$(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'));
|
||||
$('#id_arrival_DT').val(start.format('DD.MM.YYYY') + " - " + end.format('DD.MM.YYYY'))
|
||||
});
|
||||
|
||||
$(`${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;
|
||||
}
|
||||
el.addClass('next available');
|
||||
el.append('<span></span>');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(function() {
|
||||
let place_1 = document.querySelector("#id_departure_DT")
|
||||
|
||||
Reference in New Issue
Block a user