bootstrap-touchspin icon indicating copy to clipboard operation
bootstrap-touchspin copied to clipboard

Empty box min / max should be respected when using arrows

Open dotnetshadow opened this issue 7 years ago • 2 comments

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

dotnetshadow avatar Jun 26 '18 02:06 dotnetshadow

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); } });

tirolel avatar Dec 07 '18 15:12 tirolel

I noticed the same bug, I gave a closure to the callback_after_calculation option to test min and max boundaries.

shaffe-fr avatar Feb 04 '19 16:02 shaffe-fr

This bug is fixed in the latest version.

istvan-ujjmeszaros avatar Apr 07 '23 00:04 istvan-ujjmeszaros