|
|
|
@@ -111,7 +111,10 @@ function manipulateDateInputValue() { |
|
|
|
} |
|
|
|
if (inputSameDayDelivery.is(':checked')) { |
|
|
|
// If same day delivery is checked, select time |
|
|
|
$("#spwn-delivery .spwn-delivery--time span.active").trigger("click"); |
|
|
|
// $("#spwn-delivery .spwn-delivery--time span.active").trigger("click"); |
|
|
|
$(".confirm-delivery-date #spwn-dp-input").val(spawnDateInputValue + " " + $("#spwn-delivery .spwn-delivery--time span.active").text()); |
|
|
|
$(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateInputValue + " " + $("#spwn-delivery .spwn-delivery--time span.active").attr('data-time')); |
|
|
|
$(".flatpickr-hour").val($("#spwn-delivery .spwn-delivery--time span.active").attr('data-hour')); |
|
|
|
} else { |
|
|
|
$("#spwn-dp-input").val(spawnDateInputValue); |
|
|
|
} |
|
|
|
@@ -140,8 +143,10 @@ function changeDelivery(fp) { |
|
|
|
$("#spwn-delivery .spwn-delivery--time span").removeClass("active"); |
|
|
|
$(this).addClass("active"); |
|
|
|
$(".confirm-delivery-date #spwn-dp-input").val(spawnDateInputValue + " " + $(this).text()); |
|
|
|
$(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateInputValue + " " + $(this).attr('data-time')); |
|
|
|
let spawnDateTime = spawnDateInputValue + " " + $(this).attr('data-time'); |
|
|
|
$(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateTime); |
|
|
|
$(".flatpickr-hour").val($(this).attr('data-hour')); |
|
|
|
fp.setDate(spawnDateInputValue, true, "d.m.Y H:i"); |
|
|
|
}); |
|
|
|
|
|
|
|
let daysToAdd = 0; |
|
|
|
@@ -202,7 +207,7 @@ function changeDelivery(fp) { |
|
|
|
// If Abendzustellung date is not in DPD range |
|
|
|
setDateSelected(); |
|
|
|
} |
|
|
|
$(".flatpickr-hour").val('00'); |
|
|
|
$(".flatpickr-hour").val('01'); |
|
|
|
} |
|
|
|
} else { |
|
|
|
console.log("DPD AT"); |
|
|
|
@@ -217,7 +222,7 @@ function changeDelivery(fp) { |
|
|
|
// If Abendzustellung or DPD DE date is not in DPD AT range |
|
|
|
setDateSelected(); |
|
|
|
} |
|
|
|
$(".flatpickr-hour").val('00'); |
|
|
|
$(".flatpickr-hour").val('01'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|