From 88f24348a0828cf187c250dce4794e3db8b89e95 Mon Sep 17 00:00:00 2001 From: Brian Rowe Date: Thu, 21 Aug 2014 11:26:10 -0400 Subject: [PATCH] Fixes #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 --- dist/jquery-ui-timepicker-addon.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dist/jquery-ui-timepicker-addon.js b/dist/jquery-ui-timepicker-addon.js index 16ced27..381e43d 100644 --- a/dist/jquery-ui-timepicker-addon.js +++ b/dist/jquery-ui-timepicker-addon.js @@ -1065,7 +1065,10 @@ o[opts] = val; } else { o = opts; } - 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')); + /* + * 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 + */ + 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')); }, value: function (tp_inst, obj, unit, val) { var $t = obj.children('select');