diff --git a/jquery-ui-timepicker-addon.css b/jquery-ui-timepicker-addon.css
index 71e4c46..e0d03c2 100644
--- a/jquery-ui-timepicker-addon.css
+++ b/jquery-ui-timepicker-addon.css
@@ -1,6 +1,6 @@
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
.ui-timepicker-div dl { text-align: left; }
-.ui-timepicker-div dl dt { height: 25px; }
-.ui-timepicker-div dl dd { margin: -25px 10px 10px 65px; }
+.ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
+.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
.ui-timepicker-div td { font-size: 90%; }
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js
index ca506d5..1a4877f 100644
--- a/jquery-ui-timepicker-addon.js
+++ b/jquery-ui-timepicker-addon.js
@@ -1,8 +1,8 @@
/*
* jQuery timepicker addon
* By: Trent Richardson [http://trentrichardson.com]
-* Version 0.9.7
-* Last Modified: 10/02/2011
+* Version 0.9.8
+* Last Modified: 12/03/2011
*
* Copyright 2011 Trent Richardson
* Dual licensed under the MIT and GPL licenses.
@@ -12,15 +12,15 @@
* HERES THE CSS:
* .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
* .ui-timepicker-div dl { text-align: left; }
-* .ui-timepicker-div dl dt { height: 25px; }
-* .ui-timepicker-div dl dd { margin: -25px 10px 10px 65px; }
+* .ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
+* .ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
* .ui-timepicker-div td { font-size: 90%; }
* .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
*/
(function($) {
-$.extend($.ui, { timepicker: { version: "0.9.7" } });
+$.extend($.ui, { timepicker: { version: "0.9.8" } });
/* Time picker manager.
Use the singleton instance of this class, $.timepicker, to interact with the time picker.
@@ -54,10 +54,10 @@ function Timepicker() {
showMillisec: false,
showTimezone: false,
showTime: true,
- stepHour: 0.05,
- stepMinute: 0.05,
- stepSecond: 0.05,
- stepMillisec: 0.5,
+ stepHour: 1,
+ stepMinute: 1,
+ stepSecond: 1,
+ stepMillisec: 1,
hour: 0,
minute: 0,
second: 0,
@@ -83,7 +83,9 @@ function Timepicker() {
altFieldTimeOnly: true,
showTimepicker: true,
timezoneIso8609: false,
- timezoneList: null
+ timezoneList: null,
+ addSliderAccess: false,
+ sliderAccessArgs: null
};
$.extend(this._defaults, this.regional['']);
}
@@ -341,10 +343,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.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),
+ hourMax = parseInt((o.hourMax - ((o.hourMax - o.hourMin) % o.stepHour)) ,10),
+ minMax = parseInt((o.minuteMax - ((o.minuteMax - o.minuteMin) % o.stepMinute)) ,10),
+ secMax = parseInt((o.secondMax - ((o.secondMax - o.secondMin) % o.stepSecond)) ,10),
+ millisecMax = parseInt((o.millisecMax - ((o.millisecMax - o.millisecMin) % o.stepMillisec)) ,10),
dp_id = this.inst.id.toString().replace(/([^A-Za-z0-9_])/g, '');
// Prevent displaying twice
@@ -365,10 +367,10 @@ $.extend(Timepicker.prototype, {
size;
// Hours
+ html += '
';
if (o.showHour && o.hourGrid > 0) {
- html += '' +
- '' +
- '';
+ html += '';
for (var h = o.hourMin; h <= hourMax; h += parseInt(o.hourGrid,10)) {
hourGridSize++;
@@ -382,70 +384,63 @@ $.extend(Timepicker.prototype, {
html += '' + tmph + ' | ';
}
- html += '
' +
- '';
- } else html += '';
-
- html += '' + o.minuteText + '';
+ html += '
';
+ }
+ html += '';
// Minutes
+ html += '' + o.minuteText + ''+
+ '';
+
if (o.showMinute && o.minuteGrid > 0) {
- html += '' +
- '' +
- '';
+ html += '';
for (var m = o.minuteMin; m <= minMax; m += parseInt(o.minuteGrid,10)) {
minuteGridSize++;
html += '' + ((m < 10) ? '0' : '') + m + ' | ';
}
- html += '
' +
- '';
- } else html += '';
+ html += '
';
+ }
+ html += '';
// Seconds
html += '' + o.secondText + '';
+ ((o.showSecond) ? '' : noDisplay) + '>' + o.secondText + ''+
+ '';
if (o.showSecond && o.secondGrid > 0) {
- html += '' +
- '' +
- '';
+ html += '';
for (var s = o.secondMin; s <= secMax; s += parseInt(o.secondGrid,10)) {
secondGridSize++;
html += '' + ((s < 10) ? '0' : '') + s + ' | ';
}
- html += '
' +
- '';
- } else html += '';
+ html += '
';
+ }
+ html += '';
// Milliseconds
html += '' + o.millisecText + '';
+ ((o.showMillisec) ? '' : noDisplay) + '>' + o.millisecText + ''+
+ '';
if (o.showMillisec && o.millisecGrid > 0) {
- html += '' +
- '' +
- '';
+ html += '';
for (var l = o.millisecMin; l <= millisecMax; l += parseInt(o.millisecGrid,10)) {
millisecGridSize++;
- html += '' + ((l < 10) ? '0' : '') + s + ' | ';
+ html += '' + ((l < 10) ? '0' : '') + l + ' | ';
}
- html += '
' +
- '';
- } else html += '';
+ html += '
';
+ }
+ html += '';
// Timezone
html += '