我想在ext js 2.3中明确地做到这一点。 http://docs.sencha.com/extjs/2.3.0/#!/api/Ext.grid.PropertyGrid我已将此
包括在内var grid = new Ext.grid.PropertyGrid({
title: 'Properties Grid',
autoHeight: true,
width: 500,
//renderTo: 'grid-ct',
source: {
//"(name)": "My Object",
//"Created": new Date(Date.parse('10/15/2006')),
timeofday: "12:00 PM",
"Available": false,
myVersion: 1,
//"Description": "A test object"
},
customEditors: {
timeofday: new Ext.form.TimeField({
selectOnFocus : true,
}),
myVersion: {
xtype: "textfield",
allowBlank: true,
}
},
propertyNames: {
timeofday: 'Time of Day',
myVersion: "Version",
},
在customeditor方法
customEditors: {timeofday: new Ext.form.TimeField({
selectOnFocus : true})
这应该编辑时间字段,但它会在下一行生成新的时间字段。我希望以这种方式进行验证http://jsfiddle.net/existdissolve/wMcQk/
提前致谢
答案 0 :(得分:0)
您可以使用与myVersion相同的方式编写Timefield:
timeofday: {
xtype: "timefield",
selectOnFocus: true
}