$.datepicker.setDefaults({ showButtonPanel: true, beforeShow : function( input ) { setTimeout(function() { var buttonPane = $(input) .datepicker( "widget" ) .find( ".ui-datepicker-buttonpane" ); $( "<button>", { text: "清除", click: function() { $.datepicker._clearDate(input); } }).addClass("ui-state-default ui-priority-primary ui-corner-all").appendTo( buttonPane ); }, 1 ); } });
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/14046.html