$.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 );
}
});
JQueryUI DatePicker 设置清空按钮
最新推荐文章于 2024-07-15 14:46:38 发布