How to display date in ExtJS Gridpanel column (Date with time )
Please provide syntax.
I made a similar aproach as showed above by Kinjeiro, but I had to omit the xtype:'datecolumn'
in order to make it work. So in my case it worked with this code:
Model
this.store = new Ext.data.JsonStore({
proxy:new Ext.data.ScriptTagProxy({
url: "php/resource.php"
}),
root: 'result',
autoLoad: true,
fields: [
{name:'Name',type:'string',mapping:'NAME'},
{name:'Date',type:'date',dateFormat: 'd/m/Y H:i:s',mapping:'DT_ORDER'},
]
});
Grid config
{
columns: [
{ header:'Name',width:70,sortable:true,dataIndex:'NAME',align:'left'},
{
header:'Date',
width:150,
sortable:true,
dataIndex:'DT_ORDER',
align:'left',
renderer: Ext.util.Format.dateRenderer('d/m/Y H:i:s')
}
]
}