给easyui datebox扩展一个清空按钮,无侵入
/**
 * 给时间框控件扩展一个清除的按钮
 */
$.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
    });

})(jQuery)
给easyui datebox扩展一个清空按钮,无侵入
给easyui datebox扩展一个清空按钮,无侵入
/**
 * 给时间框控件扩展一个清除的按钮
 */
$.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
    });

})(jQuery)
给easyui datebox扩展一个清空按钮,无侵入

相关文章:

  • 2021-09-17
  • 2021-11-28
  • 2021-06-17
  • 2022-01-02
  • 2022-01-24
  • 2022-12-23
  • 2022-12-23
  • 2021-11-05
猜你喜欢
  • 2022-12-23
  • 2021-08-02
  • 2021-12-07
  • 2021-07-03
  • 2022-02-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案