Ext.define('Contact', {
extend: 'Ext.data.Model',
fields: [{
name: 'id',
type: 'int',
useNull: true
}
,{name:'yujifahuo_date',type:"date",dateFormat:'Y-m-d'}]
});
var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
saveBtnText: '保存',
cancelBtnText: "取消",
listeners: {
cancelEdit: function(rowEditing, context) {
// Canceling editing of a locally added, unsaved record: remove it
if (context.record.phantom) {
store.remove(context.record);
}
}
}
});
var grid = Ext.create('Ext.grid.Panel', {
plugins: [rowEditing],
frame: true,
store: store,
iconCls: 'icon-contact',
columns: [{
text: 'ID',
//width: 50,
sortable: true,
dataIndex: 'id',
},
{
header: '预计发货时间',
sortable: true,
dataIndex: 'yujifahuo_date',
field: {
xtype: 'datefield',format:'Y-m-d'
},
renderer:new Ext.util.Format.dateRenderer('Y-m-d'),
}]
});
03-08
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交