Force type int of grid options
This commit is contained in:
parent
9fa3845513
commit
00b190aa48
8
jquery-ui-timepicker-addon.js
vendored
8
jquery-ui-timepicker-addon.js
vendored
|
@ -317,7 +317,7 @@ $.extend(Timepicker.prototype, {
|
||||||
'<div id="ui_tpicker_hour_' + dp_id + '"' + ((o.showHour) ? '' : noDisplay) + '></div>' +
|
'<div id="ui_tpicker_hour_' + dp_id + '"' + ((o.showHour) ? '' : noDisplay) + '></div>' +
|
||||||
'<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';
|
'<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';
|
||||||
|
|
||||||
for (var h = o.hourMin; h <= hourMax; h += o.hourGrid) {
|
for (var h = o.hourMin; h <= hourMax; h += parseInt(o.hourGrid,10)) {
|
||||||
hourGridSize++;
|
hourGridSize++;
|
||||||
var tmph = (o.ampm && h > 12) ? h-12 : h;
|
var tmph = (o.ampm && h > 12) ? h-12 : h;
|
||||||
if (tmph < 10) tmph = '0' + tmph;
|
if (tmph < 10) tmph = '0' + tmph;
|
||||||
|
@ -344,7 +344,7 @@ $.extend(Timepicker.prototype, {
|
||||||
((o.showMinute) ? '' : noDisplay) + '></div>' +
|
((o.showMinute) ? '' : noDisplay) + '></div>' +
|
||||||
'<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';
|
'<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';
|
||||||
|
|
||||||
for (var m = o.minuteMin; m <= minMax; m += o.minuteGrid) {
|
for (var m = o.minuteMin; m <= minMax; m += parseInt(o.minuteGrid,10)) {
|
||||||
minuteGridSize++;
|
minuteGridSize++;
|
||||||
html += '<td>' + ((m < 10) ? '0' : '') + m + '</td>';
|
html += '<td>' + ((m < 10) ? '0' : '') + m + '</td>';
|
||||||
}
|
}
|
||||||
|
@ -364,7 +364,7 @@ $.extend(Timepicker.prototype, {
|
||||||
((o.showSecond) ? '' : noDisplay) + '></div>' +
|
((o.showSecond) ? '' : noDisplay) + '></div>' +
|
||||||
'<div style="padding-left: 1px"><table><tr>';
|
'<div style="padding-left: 1px"><table><tr>';
|
||||||
|
|
||||||
for (var s = o.secondMin; s <= secMax; s += o.secondGrid) {
|
for (var s = o.secondMin; s <= secMax; s += parseInt(o.secondGrid,10)) {
|
||||||
secondGridSize++;
|
secondGridSize++;
|
||||||
html += '<td>' + ((s < 10) ? '0' : '') + s + '</td>';
|
html += '<td>' + ((s < 10) ? '0' : '') + s + '</td>';
|
||||||
}
|
}
|
||||||
|
@ -384,7 +384,7 @@ $.extend(Timepicker.prototype, {
|
||||||
((o.showMillisec) ? '' : noDisplay) + '></div>' +
|
((o.showMillisec) ? '' : noDisplay) + '></div>' +
|
||||||
'<div style="padding-left: 1px"><table><tr>';
|
'<div style="padding-left: 1px"><table><tr>';
|
||||||
|
|
||||||
for (var l = o.millisecMin; l <= millisecMax; l += o.millisecGrid) {
|
for (var l = o.millisecMin; l <= millisecMax; l += parseInt(o.millisecGrid,10)) {
|
||||||
millisecGridSize++;
|
millisecGridSize++;
|
||||||
html += '<td>' + ((l < 10) ? '0' : '') + s + '</td>';
|
html += '<td>' + ((l < 10) ? '0' : '') + s + '</td>';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue