DatePickerFor behavior changes in grid

2 posts, 0 answers
  1. montgomery
    montgomery avatar
    10 posts
    Member since:
    Feb 2007

    Posted 07 Mar 2013 Link to this post

    We are using Kendo 2012.3..1315.340. Here is the issue. We are using the EditorTemplate for DateTime?, which calls DatePickerFor. This works wonderfully in a standard cshtml view and the POST contains the name/value TransactionDate = "03/19/2013". However, if I use the same view model in a grid and use either inline editing or popup editing I get a POST with TransactionDate = "Tue Mar 19 2013 00:00:00 GMT-0700 (Pacific Daylight Time)". This value does not automatically populate the view model on submission and the date property on the model defaults to DateTime.MinValue. Since this is an identical view model with and identical editor template, does anyone have any ideas on why the POST values are different (and seemingly improperly formatted from the grid)?
  2. montgomery
    montgomery avatar
    10 posts
    Member since:
    Feb 2007

    Posted 08 Mar 2013 Link to this post

    This was an error caused by converting an existing Telerik MVC 3 app to MVC 4 and Kendo. A reference to jquery that came with MVC 4 was being used without a reference to the jquery that is part of the Kendo script directory. I don't know if this was missing from the Kendo conversion documentation or if I just missed it. This leads to odd behavior in the Kendo controls (as you would expect!) but the errors are subtle. Most of the controls work fine. Hopefully this will be useful to anyone else who has difficulty with a conversion.
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top