I need the default value of datetime picker to be empty.
@(Html.Kendo().DatePickerFor(model => model.RevisionDate)
.Name("RevisionDate")
)
"RevisionDate" is a datetime property in a asp.net mvc model.
how it's currently being displayed
and i need to display it as below
Your
RevisionDate
property is by default set toDateTime.MinValue
which is 01/01/0001 ( allDateTime
properties behave like that). This is why the Kendo UI DatePicker shows it like that. The solution is to make the property a nullableDateTime
(DateTime?
) whose default value isnull
.