Kendo grid time value in date column

I have a kendo grid, it has a date column. I want to show the date and time there. I use the below format in the column definition,

format: "{0:dd-MMM-yyyy hh:mm:ss tt}"

In modal I used date type Updated_Date: { type: "date" }

The release date comes as "10-Oct-2013 12:00:00 AM", but the actual date returned through the ajax call is "Updated_Date": "2013-10-10T05: 02: 40.44"

What to do to show the correct time in the Grid, like 10-Oct-2013 05:02:40 AM?

+4
source share
2 answers

There are two fields that are usually confused:

, parseFormat - T , :

Try:

columns   : [
    ...
    {
        field       : "Date",
        title       : "Date",
        format      : "{0:dd-MMM-yyyy hh:mm:ss tt}",
        parseFormats: ["yyyy-MM-dd'T'HH:mm:ss.zz"]
    }
]

: http://jsfiddle.net/OnaBai/Ahq6s/

+9

. , . "" :

columns   : [
...
{
    field       : "Date",
    title       : "Date",
    type        : "date",
    format      : "{0:dd-MMM-yyyy hh:mm:ss tt}",
    parseFormats: ["yyyy-MM-dd'T'HH:mm:ss.zz"]
}

]

+3

All Articles