/**
* 给时间框控件扩展一个清除的按钮
*/
$.fn.datebox.defaults.cleanText = '清空';
(function ($) {
var buttons = $.extend([], $.fn.datebox.defaults.buttons);
buttons.splice(1, 0, {
text: function (target) {
return $(target).datebox("options").cleanText
},
handler: function (target) {
$(target).datebox("setValue", "");
$(target).datebox("hidePanel");
}
});
$.extend($.fn.datebox.defaults, {
buttons: buttons
});
文章出处:https://www.cnblogs.com/yeminglong/p/5264334.html
本文介绍了一种扩展时间框控件的方法,在jQuery插件DateBox中增加了一个清除按钮的功能,并提供了实现代码。
137

被折叠的 条评论
为什么被折叠?



