default date if not set in _setDate

This commit is contained in:
Trent Richardson 2010-11-12 07:55:32 -05:00
parent 0c56593fb4
commit 45985eebe0

View file

@ -817,6 +817,11 @@
$.datepicker._base_setDate = $.datepicker._setDate;
$.datepicker._setDate = function(inst, date, noChange) {
var tp_inst = $.datepicker._get(inst, 'timepicker');
if(!date){
date = new Date();
}
var tp_date = new Date(date.getYear(), date.getMonth(), date.getDay(), date.getHours(), date.getMinutes(), date.getSeconds());
$.datepicker._updateDatepicker(inst);