Force type int of grid options

This commit is contained in:
Trent Richardson 2011-07-25 07:14:51 -04:00
parent 9fa3845513
commit 00b190aa48

View file

@ -317,7 +317,7 @@ $.extend(Timepicker.prototype, {
'<div id="ui_tpicker_hour_' + dp_id + '"' + ((o.showHour) ? '' : noDisplay) + '></div>' +
'<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++;
var tmph = (o.ampm && h > 12) ? h-12 : h;
if (tmph < 10) tmph = '0' + tmph;
@ -344,7 +344,7 @@ $.extend(Timepicker.prototype, {
((o.showMinute) ? '' : noDisplay) + '></div>' +
'<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++;
html += '<td>' + ((m < 10) ? '0' : '') + m + '</td>';
}
@ -364,7 +364,7 @@ $.extend(Timepicker.prototype, {
((o.showSecond) ? '' : noDisplay) + '></div>' +
'<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++;
html += '<td>' + ((s < 10) ? '0' : '') + s + '</td>';
}
@ -384,7 +384,7 @@ $.extend(Timepicker.prototype, {
((o.showMillisec) ? '' : noDisplay) + '></div>' +
'<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++;
html += '<td>' + ((l < 10) ? '0' : '') + s + '</td>';
}