`

datebox 和 datetimebox 添加『清空』按钮

阅读更多

http://www.bubuko.com/infodetail-1695608.html

$(document).ready(function(){

    var d_buttons = $.extend([], $.fn.datebox.defaults.buttons);
    d_buttons.splice(1, 0, {
        text: '清空',
    handler: function(target){
        $(target).datebox('setValue','');
    }
});
    $('.easyui-datebox').datebox({
        buttons: d_buttons,
        editable:false,
        width:'100px'
});

    var dt_buttons = $.extend([], $.fn.datetimebox.defaults.buttons);
    dt_buttons.splice(2, 0, {
        text: '清空',
    handler: function(target){
        $(target).datetimebox('setValue','');
    }
});
    $('.easyui-datetimebox').datetimebox({
        buttons: dt_buttons,
        editable:false,
        width:'150px'
});
});
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics