Hello supposing i have a model with a field like this: (mvc5)
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
public Nullable<System.DateTime> Date { get; set; }
In the razor view (3.0) i use the Html helper to show a date picker field, like this:
@Html.EditorFor(model => model.reunion.Date)
@Html.ValidationMessageFor(model => model.reunion.Date)
On the input on the html i will have something like this:
<input class="text-box single-line valid" data-val="true" data-val-date="The field Date must be a date." data-val-required="O campo Date é necessário." id="reunion_Date" name="reunion.Date" type="date" value="2017-01-01" aria-required="true" aria-describedby="reunion_Date-error" aria-invalid="false">
And the image of the picker of date:
It works fine.
But let's suppose i want to restrict the date the user can select to only dates that are equal or more than the actual date. What is the way i could do that?