easyui时间控件设置为可清空——jquery-easyui-1.3.3(这个版本还没有buttons,网上的好多博文都是1.3.5之后的版本)

Posted 淘来的星湖

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了easyui时间控件设置为可清空——jquery-easyui-1.3.3(这个版本还没有buttons,网上的好多博文都是1.3.5之后的版本)相关的知识,希望对你有一定的参考价值。

效果图:

更改的源码jquery.easyui.min.js 11358行:

var _858=$("<div class=\\"datebox-button\\"></div>").appendTo(_856);
$("<a href=\\"javascript:void(0)\\" class=\\"datebox-current\\"></a>").html(opts.currentText).appendTo(_858);
$("<a href=\\"javascript:void(0)\\" class=\\"datebox-clean\\"></a>").html(opts.cleanText).appendTo(_858);
$("<a href=\\"javascript:void(0)\\" class=\\"datebox-close\\"></a>").html(opts.closeText).appendTo(_858);
_858.find(".datebox-current,.datebox-clean,.datebox-close").hover(function(){
$(this).addClass("datebox-button-hover");
},function(){
$(this).removeClass("datebox-button-hover");
});
_858.find(".datebox-current").click(function(){
_854.calendar.calendar({year:new Date().getFullYear(),month:new Date().getMonth()+1,current:new Date()});
});
_858.find(".datebox-clean").click(function(){    //clean——新增清空
$(_853).combo(\'setText\',\'\');  
$(_853).combo(\'setValue\',\'\'); 
$(_853).combo("hidePanel");
});
_858.find(".datebox-close").click(function(){
$(_853).combo("hidePanel");
});
};
};

jquery.easyui.min.js 11441行:

}},currentText:"Today",cleanText:"Clean",closeText:"Close",okText:"Ok",formatter:function(date){

更改easyui-lang-zh_CN.js,41行增加:$.fn.datebox.defaults.cleanText = \'清空\';

完成。

 

以上是关于easyui时间控件设置为可清空——jquery-easyui-1.3.3(这个版本还没有buttons,网上的好多博文都是1.3.5之后的版本)的主要内容,如果未能解决你的问题,请参考以下文章

jQuery easyUI combotree清除选择

请问,jQuery Handsontable控件如何像excel一样,设置公式,让某个单元格的值自动算出来?

JQuery calendar 日历控件去除已选日期问题?

jquery 怎么设置输入框只能输入数字

jQuery怎么设置读取删除清空cookie

拖放到动态创建的 div 后,Jquery-ui 可拖动无法正常工作