Merge pull request #249 from novoj/dev
Issue when combining stepHours and minHour / maxHour
This commit is contained in:
commit
680c0255f6
1 changed files with 19 additions and 19 deletions
16
jquery-ui-timepicker-addon.js
vendored
16
jquery-ui-timepicker-addon.js
vendored
|
@ -340,10 +340,10 @@ $.extend(Timepicker.prototype, {
|
|||
// Added by Peter Medeiros:
|
||||
// - Figure out what the hour/minute/second max should be based on the step values.
|
||||
// - Example: if stepMinute is 15, then minMax is 45.
|
||||
hourMax = (o.hourMax - (o.hourMax % o.stepHour)).toFixed(0),
|
||||
minMax = (o.minuteMax - (o.minuteMax % o.stepMinute)).toFixed(0),
|
||||
secMax = (o.secondMax - (o.secondMax % o.stepSecond)).toFixed(0),
|
||||
millisecMax = (o.millisecMax - (o.millisecMax % o.stepMillisec)).toFixed(0),
|
||||
hourMax = (o.hourMax - ((o.hourMax - o.hourMin) % o.stepHour)).toFixed(0),
|
||||
minMax = (o.minuteMax - ((o.minuteMax - o.minuteMin) % o.stepMinute)).toFixed(0),
|
||||
secMax = (o.secondMax - ((o.secondMax - o.secondMin) % o.stepSecond)).toFixed(0),
|
||||
millisecMax = (o.millisecMax - ((o.millisecMax - o.millisecMin) % o.stepMillisec)).toFixed(0),
|
||||
dp_id = this.inst.id.toString().replace(/([^A-Za-z0-9_])/g, '');
|
||||
|
||||
// Prevent displaying twice
|
||||
|
@ -731,10 +731,10 @@ $.extend(Timepicker.prototype, {
|
|||
}
|
||||
|
||||
if(adjustSliders !== undefined && adjustSliders === true){
|
||||
var hourMax = (this._defaults.hourMax - (this._defaults.hourMax % this._defaults.stepHour)).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),
|
||||
millisecMax = (this._defaults.millisecMax - (this._defaults.millisecMax % this._defaults.stepMillisec)).toFixed(0);
|
||||
var hourMax = (this._defaults.hourMax - ((this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour)).toFixed(0),
|
||||
minMax = (this._defaults.minuteMax - ((this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute)).toFixed(0),
|
||||
secMax = (this._defaults.secondMax - ((this._defaults.secondMax - this._defaults.secondMin) % this._defaults.stepSecond)).toFixed(0),
|
||||
millisecMax = (this._defaults.millisecMax - ((this._defaults.millisecMax - this._defaults.millisecMin) % this._defaults.stepMillisec)).toFixed(0);
|
||||
|
||||
if(this.hour_slider)
|
||||
this.hour_slider.slider("option", { min: this._defaults.hourMin, max: hourMax }).slider('value', this.hour);
|
||||
|
|
Loading…
Reference in a new issue