Skip to content

Commit 13eeded

Browse files
committed
Adding "return" for beforeShow function. Helps in deciding to show DatePicker. If the value returned from beforeShow (custom function) is false, popup must not show up. (This is the general behaviour in JQuery UI DatePicker as well.
1 parent 0a68b5c commit 13eeded

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jquery-ui-timepicker-addon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ $.extend(Timepicker.prototype, {
147147
tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, o, {
148148
beforeShow: function(input, dp_inst) {
149149
if ($.isFunction(o.beforeShow))
150-
o.beforeShow(input, dp_inst, tp_inst);
150+
return o.beforeShow(input, dp_inst, tp_inst);
151151
},
152152
onChangeMonthYear: function(year, month, dp_inst) {
153153
// Update the time as well : this prevents the time from disappearing from the $input field.

0 commit comments

Comments
 (0)