(1)重写datetimebox定义代码:
// 重写datetimebox
$.extend($.fn.datagrid.defaults.editors, {
datetimebox : {
init : function(container, options) {
var box = $('<input />').appendTo(container);
box.datetimebox(options);
return box;
},
getValue : function(target) {
return $(target).datetimebox('getValue');
},
setValue : function(target, value) {
$(target).datetimebox('setValue', value);
},
resize : function(target, width) {
var box = $(target);
box.datetimebox('resize', width);
},
destroy : function(target) {
$(target).datetimebox('destroy');
}
}
});
(2)调用代码:
{field:'fieldName',title:'标题',width:140,align:'center',sortable:true,hidden:false,editor:{
type:'datetimebox' ,
options:{
editable:false
}
}}