Repro link: https://jsfiddle.net/isaporto/hav7pqs5/
HTML:
<button>
Click here
</button>
JS:
document.querySelector('button').addEventListener('click', () => {
Swal.fire({
title: 'Select a date',
html: `<div id="modal-content">
<form>
<input type="text" class="flatpickr">
</form>
</div>`,
showConfirmButton: false,
})
flatpickr(".flatpickr", {
dateFormat: "d/m/Y",
minDate: new Date(),
static: true
})
})
When the datepickr input is focused and the user click on the down arrow key, it is supposed to focus and allow us to navigate through the flatpick calender using the keyboard, but inside the sweetalert modal this doesn't occur Unlike bootstrap modal, the Sweetalert2 modal is inserted in the tree by ajax, but I don't know if is this the cause of the bug.