angular-rangeslider icon indicating copy to clipboard operation
angular-rangeslider copied to clipboard

Step Values in Decimal

Open AnirbanKundu opened this issue 9 years ago • 6 comments

Hi,

Just wanted to check if the "step" values can be given in decimal. I have "step" values for few sliders ranging from 0.1 to 0.5. I set the value to 0.1 but looks like it is not working. Any idea on how to resolve this ?

Thanks, Anirban

AnirbanKundu avatar May 07 '15 21:05 AnirbanKundu

I think it should work with a decimal but I've just tried your scenario and it isn't working for me either... I suspect it might be a rounding issue

danielcrisp avatar May 08 '15 08:05 danielcrisp

Adding the attribute decimal-places="1" to the range slider resolves this for me

jdmarsh avatar Jun 03 '15 15:06 jdmarsh

yes i did the same. decimal-places="1"

romain10009 avatar Jun 25 '15 14:06 romain10009

I'm trying to create several sliders with ng-repeat. When I try to dynamically set the decimal-places (some need to be 0, some need to be 1), none of sliders step by the correct increment.

Even when I specifically set decimal-places to 0 for each slider, the step gets overwritten, defaulting to 1.

cmperez avatar Aug 28 '15 00:08 cmperez

HI THERE

how about for smaller decimal values. like from 0 - 1 ( 0.3, 0.5, 0.8 )

j-cornelio avatar Feb 17 '16 23:02 j-cornelio

Hi, decimal-places="1" Will work for a range of 0 -1, so you will see 0.9 ,0.8, 0.7 etc... when moving th max slider down

ccdle12 avatar Sep 15 '16 10:09 ccdle12