Lines 350-357
Link Here
|
350 |
} |
350 |
} |
351 |
}); |
351 |
}); |
352 |
|
352 |
|
353 |
const pickupDate = document.getElementById("pickup-date"); |
353 |
const pickupDate_fp = document.getElementById("pickup-date")._flatpickr; |
354 |
pickupDate._flatpickr.config.onClose.push(function( selectedDates, dateStr, instance ){ |
354 |
pickupDate_fp.set('disable', [function(date) { |
|
|
355 |
return !slots_per_day.hasOwnProperty(date.getDay()); |
356 |
}]); |
357 |
pickupDate_fp.config.onClose.push(function( selectedDates, dateStr, instance ){ |
355 |
/* Here we add an onClose event to the existing flatpickr instance */ |
358 |
/* Here we add an onClose event to the existing flatpickr instance */ |
356 |
/* It fires after the user has selected a date from the calendar popup */ |
359 |
/* It fires after the user has selected a date from the calendar popup */ |
357 |
$('#pickup-times').html("<label>" + _("Select a time") + ":</label><div id=\"pickup-time-slots\"></div>"); |
360 |
$('#pickup-times').html("<label>" + _("Select a time") + ":</label><div id=\"pickup-time-slots\"></div>"); |
358 |
- |
|
|