I have been researching this for days without much luck. I've gone down multiple paths but can't seem to find a solution that works. Any help would be greatly appreciated.
I have a Kendo MVC Grid wired up for CRUD
@(Html.Kendo().Grid<Games.Models.Game>()
.Name("Grid")
.Columns(columns => {
columns.Bound(p => p.GameName).Width(100);
columns.Bound(p => p.Publisher).Width(75);
columns.Bound(p => p.MaxPlayers).Width(75);
columns.Bound(p => p.DateAdded).Width(100).Format("{0:MM/dd/yyyy}");
When I try and edit the DateAdded field, it changes the date from my nicely formatted date of 05/01/2003 to Thu May 1 17:00:00 CDT 2003 and throws an error when you try to update the data (any data I enter is converted to the Day, Month, Time, TimeZone year format).
The grid throws a "The field DateAdded must be a date error".
I've tried using an Editor Template using the Kendo Date Picker, but the data is not updating into my model.
columns.Bound(p => p.DateAdded).Width(100).Format("{0:MM/dd/yyyy}").EditorTemplateName("DateTime");
Editor Template:
@(Html.Kendo().DatePicker()
.Name("datepicker")
.Format("M/d/yyyy")
)
Any idea as to what I am doing wrong? I can skip using the date picker if I can update the date inline, but I can't get either method to work.