Open Benzolitz opened 9 years ago
Thanks (again) for the pull request. Can you provide a configuration that will cause the error(s)?
Thanks in advance.
Point 1:
$('#txtTesting').jStepper({minValue: 10, maxValue: 20, minLength: 2});
After you typed in 10, try to change the number to 11. When I remove the 0 to add another 1, the script automatically changes the value to minValue. Only possiblities to change:
Point 2: I can't reproduce the error now, sorry. The problem was that I had a maxValue of 20 and when I typed in a 9 the script would change it to 20, because he would check if "9" > "20", which is true because both are strings.
Point 3: Just a minor pet peeve of mine ^^. https://github.com/EmKayDK/jstepper/blob/master/jquery.jstepper.js : Row 128
strValue < o.minValue && strValue != ''"
You first check strValue < minValue and then check if strValue even contains something. The logical order makes no sense for me.
Example:
strValue = "", minValue = 5
your code: check if strValue < minValue AND then check if strValue even contains something. my code: check if string Value contains something.
Building upon @loicfevrier 's Pull request (https://github.com/EmKayDK/jstepper/pull/3).