|
1 |
| -/*! jQuery Timepicker Addon - v1.4.1 - 2013-11-10 |
| 1 | +/*! jQuery Timepicker Addon - v1.4.2 - 2013-11-23 |
2 | 2 | * http://trentrichardson.com/examples/timepicker
|
3 | 3 | * Copyright (c) 2013 Trent Richardson; Licensed MIT */
|
4 | 4 | (function ($) {
|
|
16 | 16 | */
|
17 | 17 | $.extend($.ui, {
|
18 | 18 | timepicker: {
|
19 |
| - version: "1.4.1" |
| 19 | + version: "1.4.2" |
20 | 20 | }
|
21 | 21 | });
|
22 | 22 |
|
|
744 | 744 | microsec = parseInt(microsec, 10);
|
745 | 745 | }
|
746 | 746 | if (timezone !== false) {
|
747 |
| - timezone = parseInt(timezone, 10); |
| 747 | + timezone = timezone.toString(); |
748 | 748 | }
|
749 | 749 |
|
750 | 750 | var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0];
|
751 | 751 |
|
752 | 752 | // If the update was done in the input field, the input field should not be updated.
|
753 | 753 | // If the update was done using the sliders, update the input field.
|
754 |
| - var hasChanged = (hour !== this.hour || minute !== this.minute || second !== this.second || millisec !== this.millisec || microsec !== this.microsec || |
755 |
| - (this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) || (this.timezone !== null && timezone !== this.timezone)); |
| 754 | + var hasChanged = ( |
| 755 | + hour !== parseInt(this.hour,10) || // sliders should all be numeric |
| 756 | + minute !== parseInt(this.minute,10) || |
| 757 | + second !== parseInt(this.second,10) || |
| 758 | + millisec !== parseInt(this.millisec,10) || |
| 759 | + microsec !== parseInt(this.microsec,10) || |
| 760 | + (this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) || |
| 761 | + (this.timezone !== null && timezone !== this.timezone.toString()) // could be numeric or "EST" format, so use toString() |
| 762 | + ); |
756 | 763 |
|
757 | 764 | if (hasChanged) {
|
758 | 765 |
|
|
799 | 806 | this.timeDefined = true;
|
800 | 807 | if (hasChanged) {
|
801 | 808 | this._updateDateTime();
|
| 809 | + this.$input.focus(); |
802 | 810 | }
|
803 | 811 | },
|
804 | 812 |
|
|
2132 | 2140 | /*
|
2133 | 2141 | * Keep up with the version
|
2134 | 2142 | */
|
2135 |
| - $.timepicker.version = "1.4.1"; |
| 2143 | + $.timepicker.version = "1.4.2"; |
2136 | 2144 |
|
2137 | 2145 | })(jQuery);
|
0 commit comments