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 to DateTime.MinValue
which is 01/01/0001 ( all DateTime
properties behave like that). This is why the Kendo UI DatePicker shows it like that. The solution is to make the property a nullable DateTime
(DateTime?
) whose default value is null
.