diff --git a/bootstrap-number-input.js b/bootstrap-number-input.js index 54a5545..42e46d4 100644 --- a/bootstrap-number-input.js +++ b/bootstrap-number-input.js @@ -37,9 +37,12 @@ var max = self.attr('max'); function setText(n) { - if ((min && n < min) || (max && n > max)) { - return false; - } + // if ((min && n < min) || (max && n > max)) { + // return false; + // } + + if(min && n < min) n = min; + else if(max && n > max) n = max; clone.focus().val(n); return true;