I have a Grid for a strongly typed model with a DateTime property CreateDate.
When editing a row, it posts the DateTime back to the server in the following format:
It posts to the following Controller action:
.Net automatically binds the other values sent across, but if fails when parsing the CreateDate with the following message:
The value 'Mon Jul 08 2013 08:50:16 GMT-0500 (Central Daylight Time)' is not valid for CreateDate.
My culture is the default en-US.
I found a forum post where someone has a similar issue. (http://www.kendoui.com/forums/kendo-ui-framework/globalization/datasource-date-format-incompatibile-with-asp-net-mvc-date-format.aspx#Z6fZydEt5E63AuZr05gjLQ)
Is there a solution that allows Kendo and .Net to automatically bind the model?
I have a workaround, and I realize I could use a custom model binder. However, both solutions are less than optimal.
Html.Kendo().Grid<
Department
>()
CreateDate:Thu Jul 11 2013 11:54:13 GMT-0500 (Central Daylight Time)
public ActionResult UpdateDepartment([DataSourceRequest] DataSourceRequest request, Department department)
.Net automatically binds the other values sent across, but if fails when parsing the CreateDate with the following message:
The value 'Mon Jul 08 2013 08:50:16 GMT-0500 (Central Daylight Time)' is not valid for CreateDate.
My culture is the default en-US.
I found a forum post where someone has a similar issue. (http://www.kendoui.com/forums/kendo-ui-framework/globalization/datasource-date-format-incompatibile-with-asp-net-mvc-date-format.aspx#Z6fZydEt5E63AuZr05gjLQ)
Is there a solution that allows Kendo and .Net to automatically bind the model?
I have a workaround, and I realize I could use a custom model binder. However, both solutions are less than optimal.