mydateEditor.target.datebox({
onSelect:function(){
}
});
这么写虽然不会报错,但datebox上的按钮不见了,不能选择日期了,只能输入日期。
你酱紫是重写设置了日期选择框,酱紫是不对哒
应该在第一次设置日期选择框中增加onSelect:function(){}
$('#tbList').datagrid({
pagination: true,
onClickCell: function (rowIndex, field, value) {
IsCheckFlag = false;
},
onSelect: function (rowIndex, rowData) {
if (!IsCheckFlag) {
IsCheckFlag = true;
$("#tbList").datagrid("unselectRow", rowIndex);
}
},
onUnselect: function (rowIndex, rowData) {
if (!IsCheckFlag) {
IsCheckFlag = true;
$("#tbList").datagrid("selectRow", rowIndex);
}
}
});
target属性是dom对象,mydateEditor.target.datebox({
onSelect:function(){
}
});这句报错了
要转为jquery对象
$(mydateEditor.target).datebox({
onSelect:function(){
}
});
上面提的都试过了。不行。程序可以正常运行,就是日期选择框右边的按钮不见了,不能点了。
只要加了.datebox('setVlaue','2011-11-11');是正常的。
.datebox({onSelect:function(date){}}),按钮会消失。
解决办法:直接在editor中配置事件。感谢各位。
editor:{
type: 'datebox',
options:{
onSelect:function(date){
}
}
}