| @@ -111,7 +111,10 @@ function manipulateDateInputValue() { | |||||
| } | } | ||||
| if (inputSameDayDelivery.is(':checked')) { | if (inputSameDayDelivery.is(':checked')) { | ||||
| // If same day delivery is checked, select time | // 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 { | } else { | ||||
| $("#spwn-dp-input").val(spawnDateInputValue); | $("#spwn-dp-input").val(spawnDateInputValue); | ||||
| } | } | ||||
| @@ -140,8 +143,10 @@ function changeDelivery(fp) { | |||||
| $("#spwn-delivery .spwn-delivery--time span").removeClass("active"); | $("#spwn-delivery .spwn-delivery--time span").removeClass("active"); | ||||
| $(this).addClass("active"); | $(this).addClass("active"); | ||||
| $(".confirm-delivery-date #spwn-dp-input").val(spawnDateInputValue + " " + $(this).text()); | $(".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')); | $(".flatpickr-hour").val($(this).attr('data-hour')); | ||||
| fp.setDate(spawnDateInputValue, true, "d.m.Y H:i"); | |||||
| }); | }); | ||||
| let daysToAdd = 0; | let daysToAdd = 0; | ||||
| @@ -202,7 +207,7 @@ function changeDelivery(fp) { | |||||
| // If Abendzustellung date is not in DPD range | // If Abendzustellung date is not in DPD range | ||||
| setDateSelected(); | setDateSelected(); | ||||
| } | } | ||||
| $(".flatpickr-hour").val('00'); | |||||
| $(".flatpickr-hour").val('01'); | |||||
| } | } | ||||
| } else { | } else { | ||||
| console.log("DPD AT"); | console.log("DPD AT"); | ||||
| @@ -217,7 +222,7 @@ function changeDelivery(fp) { | |||||
| // If Abendzustellung or DPD DE date is not in DPD AT range | // If Abendzustellung or DPD DE date is not in DPD AT range | ||||
| setDateSelected(); | setDateSelected(); | ||||
| } | } | ||||
| $(".flatpickr-hour").val('00'); | |||||
| $(".flatpickr-hour").val('01'); | |||||
| } | } | ||||
| } | } | ||||
| @@ -181,7 +181,7 @@ input.custom-number[type=number] { | |||||
| transition: all .15s ease-in-out; | transition: all .15s ease-in-out; | ||||
| &:hover, | &:hover, | ||||
| &.active { | &.active { | ||||
| background: #86b04b; | |||||
| background: #33548c; | |||||
| color: #fff; | color: #fff; | ||||
| } | } | ||||
| } | } | ||||
| @@ -111,7 +111,10 @@ function manipulateDateInputValue() { | |||||
| } | } | ||||
| if (inputSameDayDelivery.is(':checked')) { | if (inputSameDayDelivery.is(':checked')) { | ||||
| // If same day delivery is checked, select time | // 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 { | } else { | ||||
| $("#spwn-dp-input").val(spawnDateInputValue); | $("#spwn-dp-input").val(spawnDateInputValue); | ||||
| } | } | ||||
| @@ -140,8 +143,10 @@ function changeDelivery(fp) { | |||||
| $("#spwn-delivery .spwn-delivery--time span").removeClass("active"); | $("#spwn-delivery .spwn-delivery--time span").removeClass("active"); | ||||
| $(this).addClass("active"); | $(this).addClass("active"); | ||||
| $(".confirm-delivery-date #spwn-dp-input").val(spawnDateInputValue + " " + $(this).text()); | $(".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')); | $(".flatpickr-hour").val($(this).attr('data-hour')); | ||||
| fp.setDate(spawnDateInputValue, true, "d.m.Y H:i"); | |||||
| }); | }); | ||||
| let daysToAdd = 0; | let daysToAdd = 0; | ||||
| @@ -202,7 +207,7 @@ function changeDelivery(fp) { | |||||
| // If Abendzustellung date is not in DPD range | // If Abendzustellung date is not in DPD range | ||||
| setDateSelected(); | setDateSelected(); | ||||
| } | } | ||||
| $(".flatpickr-hour").val('00'); | |||||
| $(".flatpickr-hour").val('01'); | |||||
| } | } | ||||
| } else { | } else { | ||||
| console.log("DPD AT"); | console.log("DPD AT"); | ||||
| @@ -217,7 +222,7 @@ function changeDelivery(fp) { | |||||
| // If Abendzustellung or DPD DE date is not in DPD AT range | // If Abendzustellung or DPD DE date is not in DPD AT range | ||||
| setDateSelected(); | setDateSelected(); | ||||
| } | } | ||||
| $(".flatpickr-hour").val('00'); | |||||
| $(".flatpickr-hour").val('01'); | |||||
| } | } | ||||
| } | } | ||||