Hi,
I have editable grid which opens a popup when editing, this is opening a template page.
In this template page I have a kendo datepicker
<div class="editor-label">
@Html.LabelFor(model => model.DateInvoiced)
</div>
<div class="editor-field">
@(Html.Kendo().DatePickerFor(model => model.DateInvoiced))
@Html.ValidationMessageFor(model => model.DateInvoiced)
</div>
It is binding to a viewmodel where the DateInvoiced is a nullable datetime.
When we add a record we don't want to provide this value yet, but when we hit the save button, the kendo datepicker is asking us to provide the value and is making this required.
The model is nullable and does not have required attribute.
[Display(Name = "Received")]
public Nullable<DateTime> DateInvoiced { get; set; }
How do we make the datepicker allow blank value?
I have editable grid which opens a popup when editing, this is opening a template page.
In this template page I have a kendo datepicker
<div class="editor-label">
@Html.LabelFor(model => model.DateInvoiced)
</div>
<div class="editor-field">
@(Html.Kendo().DatePickerFor(model => model.DateInvoiced))
@Html.ValidationMessageFor(model => model.DateInvoiced)
</div>
It is binding to a viewmodel where the DateInvoiced is a nullable datetime.
When we add a record we don't want to provide this value yet, but when we hit the save button, the kendo datepicker is asking us to provide the value and is making this required.
The model is nullable and does not have required attribute.
[Display(Name = "Received")]
public Nullable<DateTime> DateInvoiced { get; set; }
How do we make the datepicker allow blank value?