apply fix by alexandergitter for setTime to work

This commit is contained in:
Trent Richardson 2011-06-22 06:34:40 -04:00
parent 0595fd749b
commit ae64213f33

View file

@ -590,9 +590,12 @@ $.extend(Timepicker.prototype, {
minMax = (this._defaults.minuteMax - (this._defaults.minuteMax % this._defaults.stepMinute)).toFixed(0), minMax = (this._defaults.minuteMax - (this._defaults.minuteMax % this._defaults.stepMinute)).toFixed(0),
secMax = (this._defaults.secondMax - (this._defaults.secondMax % this._defaults.stepSecond)).toFixed(0); secMax = (this._defaults.secondMax - (this._defaults.secondMax % this._defaults.stepSecond)).toFixed(0);
this.hour_slider.slider("option", { min: this._defaults.hourMin, max: hourMax }).slider('value', this.hour); if(this.hour_slider)
this.minute_slider.slider("option", { min: this._defaults.minuteMin, max: minMax }).slider('value', this.minute); this.hour_slider.slider("option", { min: this._defaults.hourMin, max: hourMax }).slider('value', this.hour);
this.second_slider.slider("option", { min: this._defaults.secondMin, max: secMax }).slider('value', this.second); if(this.minute_slider)
this.minute_slider.slider("option", { min: this._defaults.minuteMin, max: minMax }).slider('value', this.minute);
if(this.second_slider)
this.second_slider.slider("option", { min: this._defaults.secondMin, max: secMax }).slider('value', this.second);
} }
}, },
@ -629,6 +632,9 @@ $.extend(Timepicker.prototype, {
if (minute !== false) this.minute = minute; if (minute !== false) this.minute = minute;
if (second !== false) this.second = second; if (second !== false) this.second = second;
if (timezone !== false) this.timezone = timezone; if (timezone !== false) this.timezone = timezone;
if (!this.inst) this.inst = $.datepicker._getInst(this.$input[0]);
this._limitMinMaxDateTime(this.inst, true); this._limitMinMaxDateTime(this.inst, true);
} }
if (this._defaults.ampm) this.ampm = ampm; if (this._defaults.ampm) this.ampm = ampm;