title: jQuery datepicker adding custom button
body: <p>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: </p>
  
  <pre><code> $('.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 = $('&lt;button class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" type="button"&gt;Clear&lt;/button&gt;');  
              btn.unbind("click").bind("click", function () {  
                  $.datepicker._clearDate( input );  
              });  
  
              btn.appendTo( buttonPane );  
  
              }, 1 );  
          } ,
          dateFormat: 'MM yy',
          onClose: function(dateText, inst) { 
              var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
              var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
              $(this).datepicker('setDate', new Date(year, month, 1));
          }
      });
  </code></pre>
  
  <p>Any help would be appreciated. </p>