bootstrap-touchspin
bootstrap-touchspin copied to clipboard
Empty box min / max should be respected when using arrows
Hi there,
Great Library.
I initialise a text box to have min and max values, such as 10 and 50 and leave the input box blank with no value
I noticed that if I use the arrow to increase the number it initially starts at 1, then if I click again it goes to value 11.
I think if the input box is blank and you click the arrow up it should show 10
I just noticed the same issue. I was able to "fix it" via change event:
$(selector).on('change', function() { var selectedValue = $(selector).val(); if (empty(selectedValue)) { $(selector).val(minValue); } });
I noticed the same bug, I gave a closure to the callback_after_calculation option to test min and max boundaries.
This bug is fixed in the latest version.