今天在网上找了很多清空方法 发现一个i简单又有用的,但是我的是easyui1.44 在点击“今天”的时空脚本报错了。问题很简单改一点代码就好
1. 更改jquery.easyui.min.js文件 (搜today就找到在哪里了)
- }},currentText:"Today",cleanText:"Clean",closeText:"Close",okText:"Ok",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").closeText;
- },handler:function(_988){
- $(this).closest("div.combo-panel").panel("close");
- }},{ text : function(_989) {
- return $(_989).datebox("options").cleanText;
- },handler : function(_990) {
- $(_990).combo('setValue', '').combo('setText', '');
- $(this).closest("div.combo-panel").panel("close");
- }}],formatter:function(date){
如果是中文 还要改下中文包easyui-lang-zh_CN.js
- $.fn.datebox.defaults.currentText = '今天';
- $.fn.datebox.defaults.closeText = '关闭';
- $.fn.datebox.defaults.cleanText = '清空';
- if ($.fn.datetimebox && $.fn.datebox){
- $.extend($.fn.datetimebox.defaults,{
- cleanText: $.fn.datebox.defaults.cleanText,
- currentText: $.fn.datebox.defaults.currentText,
- closeText: $.fn.datebox.defaults.closeText,
- okText: $.fn.datebox.defaults.okText,
- missingMessage: $.fn.datebox.defaults.missingMessage
- });
- }
在这里要说下 easyui1.44的 会报错要把jquery.easyui.min.js中的_975(_986);改成_a50(_986);
参考文章http://blog.csdn.net/lishuangzhe7047/article/details/40147651