ExtJS grid中如何显示时间

xiaoxiao2026-03-20  9

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类型

转载请注明原文地址: https://www.6miu.com/read-5046211.html

最新回复(0)