您的位置:首页 > 产品设计 > UI/UE

解决easy ui 1.4datebox控件不能清空的问题

2014-11-20 17:25 351 查看
用easy ui遇到这个问题,在网上找到了解决方案,不过是1.3.6版本的。现提供1.4版本的修改的具体位置和代码。

我们用的是这个


修改位置:12739行,添加代码:

, {
text: function (_987) {
return $(_987).datebox("options").cleanText;
},
handler: function (_988) {
$(_988).combo("setValue", "").combo("setText", "");
$(_988).combo("hidePanel");
}
}


修改下面的代码的数字,修改为:

, {
text: function (_989) {
return $(_989).datebox("options").closeText;
},handler:function(_990){
$(this).closest("div.combo-panel").panel("close");
}}


最终的buttons里的代码是:

buttons:[{text:function(_985){
return $(_985).datebox("options").currentText;
},handler:function(_986){
$(_986).datebox("calendar").calendar({year:new Date().getFullYear(),month:new Date().getMonth()+1,current:new Date()});
_975(_986);
}
}, {
text: function (_987) {
return $(_987).datebox("options").cleanText;
},
handler: function (_988) {
$(_988).combo("setValue", "").combo("setText", "");
$(_988).combo("hidePanel");
}
}, {
text: function (_989) {
return $(_989).datebox("options").closeText;
},handler:function(_990){
$(this).closest("div.combo-panel").panel("close");
}}]


在汉化包相应位置添加代码:

$.fn.datebox.defaults.cleanText = '清空';
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐