Search code examples
javascriptextjsextjs4date-format

Extjs rowediting change time format after save


This is my code

{
    text: "Entrance Time",
    dataIndex: "entrance_time",
    id: "cl_absence_entrance_time",
    editor: {
        xtype: "timefield",
        format: "H:i"
    },
    format: "H:i",
    width: 200
}

but the result is

Tue Jan 01 2008 07:00:00 GMT+0700 (WIT)

how to change that become 07:00 ? please help me. Thank you


Solution

  • You can set a renderer to convert the Date or just use DateColumn:

    {
        xtype: 'datecolumn', 
        format : "H:i"
        // ...
    }