How to add datepicker in asp.net MVC
<div class="editor-field"> @Html.LabelFor(model => model.DOB) </div> <div class="editor-field"> @Html.TextBoxFor(model => model.DOB, new {id = "date-picker",@onchange="getage(this.value);" }) @Html.ValidationMessageFor(model => model.DOB) </div> <p id="val"></p> <script type="text/javascript"> debugger $(document).ready(function () { debugger // This will make every element with the class "date-picker" into a DatePicker element $('#date-picker').datepicker(); }); function getage(dob) { debugger var myyear = dob.substring(6...