I have managed to get the date picker showing in the modal by adding this javascript to the page:
This attaches the datepicker scripts to the date input after the modal is opened:
jQuery(document).ready(function($) {
$(‘.openModalButton’).on(‘click’, function() {
// Wait a moment for the modal content to fully load
setTimeout(function() {
$(‘.input-date’).removeClass(‘hasDatepicker’).datepicker();
}, 100);
});
});
But when you click on a date it closes the modal due to the click event bubbling up through its ancestors, so this code stops it from bubbling up:
$(document).on(‘click’, ‘.ui-datepicker’, function(event) {
event.stopPropagation();
});
-
This reply was modified 1 year, 3 months ago by briankassler.
-
This reply was modified 1 year, 3 months ago by briankassler.