-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
I'm using Laravel 5.8 and Bootstrap 4. When using this date picker in a modal, if the month or next / previous buttons are clicked, the calendar just closes. Have you come across this before and know how to fix it? Thanks.
Here is my modal html:
<div class="modal fade" id="modalTaskForm" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="form-group">
<label for="startingDate" class="pb-1">Date</label>
<input type='text' class="input-sm form-control" id='startingDate' name="starting_date" value="" />
</div>
</div>
</div>
</div>
Here is my js:
$.fn.modal.Constructor.prototype.enforceFocus = function() {};
$('#modalTaskForm').on('show.bs.modal', function (evt) {
window.myDatePicker = new DatePicker('#startingDate', {
datePickerClass: 'date-picker ',
closeOnSelect: false,
});
});
Metadata
Metadata
Assignees
Labels
No labels