-
-
Notifications
You must be signed in to change notification settings - Fork 496
Support floating point numbers #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is already possible using the step and precision options! ;) |
Indeed, changing it in the all options demo can lead to weird behaviour. This might not be the best example ever! :D Step and precision must always have compatible values in order to have a working slider. |
Ah, ok, so the key is getting the step and precision compatible. Do you have a range example handy? I must keep running into the step and precision issues. |
Sure, there you go: http://jsfiddle.net/gnp572dv/ . |
Thanks Valentin! I do notice that if the numbers are less than 0 they are rendered incorrectly.
} Those numbers render off by .001 in the fiddler. Can you confirm? or did I set something up wrong? |
Indeed, there is a bug. Can you fill an issue please? I'll have a look tomorrow. |
This is a great slider implementation, just need support added for floating point numbers and decimal precision. Use case would be the ability to set the min, max and values to numbers like -2.056 or 3.1.
Also it would be good when implementing this to allow one to specify the number of decimal places to show, for example show 2.1 or 2.109.
The text was updated successfully, but these errors were encountered: