danielcrisp / angular-rangeslider

Simple directive that creates a range slider for Angular, styled to match Bootstrap-styled form elements
danielcrisp.github.io/angular-rangeslider/
MIT License
223 stars 122 forks source link

Step Values in Decimal #71

Open AnirbanKundu opened 9 years ago

AnirbanKundu commented 9 years ago

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

danielcrisp commented 9 years ago

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

jdmarsh commented 9 years ago

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

romain10009 commented 9 years ago

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

cmperez commented 9 years ago

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.

j-cornelio commented 8 years ago

HI THERE

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

ccdle12 commented 8 years ago

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