New features Apply a Theme In Line Events From To Button Panel Week Numbers Date and Time Misc

Add a functioning button panel and reset button


<script>

$(function() {

$("#clear").datepicker({

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">Clear</BUTTON>');

  btn.unbind("click")

  .bind("click", function () {

   $.datepicker._clearDate( input );

});

  btn.appendTo( buttonPane );

}, 1 );

     }

});

});

//split here

$.datepicker._gotoToday = function(id) {

    var target = $(id);     

    var inst = this._getInst(target[0]);     

    if (this._get(inst, 'gotoCurrent') && inst.currentDay) {

                 inst.selectedDay = inst.currentDay;             

                 inst.drawMonth = inst.selectedMonth = inst.currentMonth;             

                 inst.drawYear = inst.selectedYear = inst.currentYear;     

     }     

   else {

                var date = new Date();

                inst.selectedDay = date.getDate();             

                inst.drawMonth = inst.selectedMonth = date.getMonth();             

                inst.drawYear = inst.selectedYear = date.getFullYear();             

                this._setDateDatepicker(target, date);             

                this._selectDate(id, this._getDateDatepicker(target));     

         }     

          this._notifyChange(inst);     

          this._adjustDate(target);

           this._setDateDatepicker(target, new Date());     

          this._selectDate(id, this._getDateDatepicker(target));

          }

</script>


This script will add a functioning Today button which will insert todays date, and a Clear button which will clear the input date.

If you really need it, copy the script, paste it into <!--Page Start–> and change clear to the ID of your datepicker

Select Date