SELECT2 en modal ne fonctionne pas
//replace it with your script
<script>
$('#mySelect2').select2({
dropdownParent: $('#myModal')
});
</script>
Copy Paster
//replace it with your script
<script>
$('#mySelect2').select2({
dropdownParent: $('#myModal')
});
</script>
$('.select2').select2({
dropdownParent: $('#modal .modal-body')
});
<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
...
<select id="mySelect2">
...
</select>
...
</div>
...
<script>
$('#mySelect2').select2({
dropdownParent: $('#myModal')
});
</script>
// Do this before you initialize any of your modals
$.fn.modal.Constructor.prototype.enforceFocus = function() {};