My code is similar to this one: http://demos.telerik.com/aspnet-mvc/grid/editingajax
The DateTime partial view:
@model DateTime?
@( Html.Telerik().DatePickerFor(m => m) )
and the binding in the grid:
columns.Bound(p => p.Timestamp).Width(110);
And the field in my model class:
public DateTime Timestamp
{
get; set;
}
However, when I enter value bigger that 12 for a day, I get error the field must be a date. This is so annoying! How to resolve it?
I had a similar problem.
After much head scratching and trial and error this is what worked for me.
Time partial view
The ViewModel
The View
Unobtrusive validation now seems to work and the error message “Start Time must be a date” doesn’t seem to appear. It still fails validation if the timepicker box is left unfilled.
Hope this helps.