I have the jQuery ui datepicker showing up in my web app, but when I go to choose a date, it doesn't do anything. And the default Html5 datepicker is still showing up.
How can I disable the Html5 one for the jQuery Ui datepicker to work?
This is how I did my code:
Create.cshtml
@Html.LabelFor(model => model.EnrollmentDate, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.EnrollmentDate, new { htmlAttributes = new { @class = "form-control", @id = "datepicker" } })
@Html.ValidationMessageFor(model => model.EnrollmentDate, "", new { @class = "text-danger" })
........
@section Scripts {
<script>
$(document).ready(function(){
$('#datepicker').datepicker({
dateFormat: 'dd-mm-yy'
});
});
</script>
@Scripts.Render("~/bundles/jqueryval")
}