Skip to content

Commit 88f2434

Browse files
author
Brian Rowe
committed
Fixes trentrichardson#639 - MinDate Limits Minutes/Seconds...
Check for existence of properties when determining which value to use instead of just truthiness to avoid o.min evaulating to false when its value is 0
1 parent 4996a22 commit 88f2434

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dist/jquery-ui-timepicker-addon.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,10 @@
10651065
o[opts] = val;
10661066
}
10671067
else { o = opts; }
1068-
return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), o.min || $t.data('min'), o.max || $t.data('max'), o.step || $t.data('step'));
1068+
/*
1069+
* Check for existence of properties when determining which value to use instead of just truthiness to avoid o.min evaulating to false when its value is 0
1070+
*/
1071+
return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), ('min' in o) ? o.min : $t.data('min'), ('max' in o) ? o.max : $t.data('max'), ('step' in o) ? o.step : $t.data('step'));
10691072
},
10701073
value: function (tp_inst, obj, unit, val) {
10711074
var $t = obj.children('select');

0 commit comments

Comments
 (0)