I'm facing an issue with my code when I add the datepicker to the input field's class.
JS
$(document).ready(function () {
$("#ActionDateInput").datepicker({
autoclose: true,
endDate: new Date()
});
});
HTML
<input type="text" id="ActionDateInput" class="datepicker form-control" placeholder="Date" name="date" autocomplete="off"/>
However, it works fine when I remove the datepicker from the class attribute.
HTML
<input type="text" id="ActionDateInput" class="form-control" placeholder="Date" name="date" autocomplete="off"/>
I really want to keep the datepicker in the class for design purposes. I am using bootstrap-datepicker.
<script src="${contextPath}/resources/asset/js/bootstrap-datepicker.js"></script>