pushUpdate data including a date field

2 posts, 0 answers
  1. Rafael
    Rafael avatar
    4 posts
    Member since:
    May 2013

    Posted 23 Jun 2015 Link to this post



    I am facing a problem when I try to update the grid after some change has been performed on the data row and processed by the server.

    The server returns the exact same model as it provides during the read method, but when I try to set that object using the pushUpdate method, date columns are displayed incorrectly. These values are not parsed in the client and end up being displayed as "/Date(1435096336667)/".

    I have verified that the schema correctly defines "type": "date" for the field.

    Is there any additional logic that must be performed before calling pushUpdate on the grid dataSource or should it handle a date sent as "\/Date(1435096336667)\/"?


    Thanks, Rafael

  2. Atanas Korchev
    Atanas Korchev avatar
    8462 posts

    Posted 26 Jun 2015 Link to this post

    Hi Rafael,

    Yes, you should parse the string field to convert it to a date when calling pushUpdate. Here is some sample code:

    dataItem.date = kendo.parseDate(dataItem.date);


    Atanas Korchev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top