jQuery datepicker adding custom button
I'm trying to add a custom button to the button panel of jQuery's datepicker. When I apply the following code though nothing happens: $('.date-picker').datepicker( { changeMonth: true, changeYear: true, showButtonPanel: true, beforeShow: function(input) { setTimeout(function() { var buttonPane = $(input).datepicker("widget").find( ".ui-datepicker-buttonpane" ); var btn = $('<button class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" type="button">Clear</button>'); btn.unbind("click").bind("click", function () { $.datepicker._clearDate( input ); }); btn.appendTo(