ExtJS grid中如何显示时间
效果:
实现代码:
store : new Ext.data.JsonStore({ url : 'myAction.action', root : "root", totalProperty : 'totalProperty', fields : [{ name : mytime, type : 'date', dateFormat : "Y-m-dTH:i:s", mapping : 'mytime' }]
ColumnModel:new Ext.grid.ColumnModel{ header : '时间', dataIndex : 'mytime', width : 20, sortable : false, menuDisabled : true, renderer : function(value) { return value.dateFormat('Y-m-d H:i'); } }]
在后台java程序中将对字段使用的是Timestamp类型