Skip to content

Commit a2837af

Browse files
Fixes timeRange errors
1 parent 9ea70d6 commit a2837af

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

dist/jquery-ui-timepicker-addon.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,6 +2077,13 @@
20772077
end: {} // options for end picker
20782078
}, options);
20792079

2080+
// for the mean time this fixes an issue with calling getDate with timepicker()
2081+
var timeOnly = false;
2082+
if(method === 'timepicker'){
2083+
timeOnly = true;
2084+
method = 'datetimepicker';
2085+
}
2086+
20802087
function checkDates(changed, other) {
20812088
var startdt = startTime[method]('getDate'),
20822089
enddt = endTime[method]('getDate'),
@@ -2120,6 +2127,7 @@
21202127
}
21212128

21222129
$.fn[method].call(startTime, $.extend({
2130+
timeOnly: timeOnly,
21232131
onClose: function (dateText, inst) {
21242132
checkDates($(this), endTime);
21252133
},
@@ -2128,6 +2136,7 @@
21282136
}
21292137
}, options, options.start));
21302138
$.fn[method].call(endTime, $.extend({
2139+
timeOnly: timeOnly,
21312140
onClose: function (dateText, inst) {
21322141
checkDates($(this), startTime);
21332142
},

0 commit comments

Comments
 (0)