I am using bootstrap DateTime control, I am not able to validate date that is
"Max date is today"
HTML Code
<div class="col-md-3">
<div id="datepicker-popup" class="input-group date datepicker">
@Html.TextBoxFor(model => model.FromDate, new { @class = "form-control" , @placeholder = "dd/MM/yyyy", @autocomplete = "off", @readonly = "readonly" })
<span class="input-group-addon input-group-append border-left">
<span class="mdi mdi-calendar input-group-text"></span>
</span>
</div>
</div>
Jquery Code
$('#FromDate').datepicker({
format: 'mm-dd-yyyy',
autoclose: true,
maxDate: new Date()
});
I am not able to find where I am doing something wrong, please let me know any solution if it is possible.
Thank you