title: JQuery-UI datepicker bugs out when I hack the "today" button to also select the date but only in IE
body: <p>I've used various "fixes" to make the today button also select the date and so far all of them worked nicely on Firefox but IE bugs out when I use them. Whenever I click today, the date gets selected, the input field updated and the datepicker closed but IE imediately opens another datepicker that can't be closed unless you open a new datepicker.</p>
  
  <p>This is the datepicker code with the fixes I used</p>
  
  <pre><code>var $j = jQuery.noConflict();            
              $j('#data1, #data2').datepicker({ dayNames: ['Duminica', 'Luni', 'Marti', 'Miercuri', 'Joi', 'Vineri', 'Sambata'], dayNamesMin: ['Du', 'Lu', 'Ma', 'Mi', 'Jo', 'Vi', 'Sa'], firstDay: 1,
                  monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie','Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'], 
                  monthNamesShort: ['Ian','Feb','Mar','Apr','Mai','Iun','Iul','Aug','Sep','Oct','Noi','Dec'],
                  showOtherMonths: true,
                  selectOtherMonths: true,            
                  dateFormat: 'yy-mm-dd',
                  defaultDate: new Date(),
                  changeMonth: true,
                  showButtonPanel: true, currentText: 'Astazi',
                  changeYear: true    
              });
  </code></pre>
  
  <p>The first fix I used:</p>
  
  <pre><code>$j('button.ui-datepicker-current').live('click', function() {
  $j.datepicker._curInst.input.datepicker('setDate', new Date()).datepicker('hide');
  });
  </code></pre>
  
  <p>just after I initialize the datepicker.</p>
  
  <p>Also rewrote the function with </p>
  
  <pre><code>var _gotoToday = jQuery.datepicker._gotoToday;
  // datepicker is directly inside the jQuery object, so override that
  jQuery.datepicker._gotoToday = function(a){
  var target = jQuery(a);
  var inst = this._getInst(target[0]);
  // call the old function, so default behaviour is kept
  _gotoToday.call(this, a);
  // now do an additional call to _selectDate which will set the date and close
  // close the datepicker (if it is not inline)
  jQuery.datepicker._selectDate(a, 
  jQuery.datepicker._formatDate(inst,inst.selectedDay, inst.selectedMonth,  inst.selectedYear));
  }
  </code></pre>
  
  <p>Also tried just adding </p>
  
  <pre><code>this._setDateDatepicker(target, new Date());
  this._selectDate(id, this._getDateDatepicker(target));
  </code></pre>
  
  <p>at the end of the _gotoToday function</p>
  
  <p>All of them did exactly what you'd expect in firefox but left me with the issue I mentioned above when used with IE.</p>