I suspect this question has already been asked and answered elsewhere in the forum, and, it might be more about JSON than the grid.
I am using the MVC wrappers to build a grid. The grid has two “date only” (no time) fields. I am using the Kendo DatePicker widget, but I suspect this is more appropriately a grid question. The grid is using .Ajax() for CRUD operations (which uses JsonResult).
Ex: return Json(new[] { m }.ToDataSourceResult(request, ModelState));
When the server and the user are in two different time zones, I get a displayed date that is off by one day. I assume this is because the time is midnight, and the time zone adjustment is turning midnight on the 15th into 11pm on the 14th (for example).
I tried sending UTC DateTime, but that did not work:
m.StartDate = m.StartDate.ToUniversalTime();
Is there a standard solution for this? I have seen a lot of writeups related to this issue, but most of them don’t directly address Kendo Grid using MVC wrappers and Ajax calls.
Thanks,
R
I am using the MVC wrappers to build a grid. The grid has two “date only” (no time) fields. I am using the Kendo DatePicker widget, but I suspect this is more appropriately a grid question. The grid is using .Ajax() for CRUD operations (which uses JsonResult).
Ex: return Json(new[] { m }.ToDataSourceResult(request, ModelState));
When the server and the user are in two different time zones, I get a displayed date that is off by one day. I assume this is because the time is midnight, and the time zone adjustment is turning midnight on the 15th into 11pm on the 14th (for example).
I tried sending UTC DateTime, but that did not work:
m.StartDate = m.StartDate.ToUniversalTime();
Is there a standard solution for this? I have seen a lot of writeups related to this issue, but most of them don’t directly address Kendo Grid using MVC wrappers and Ajax calls.
Thanks,
R