Menu icon Foundation
Slider and Decimals?

Is it possible to have decimal places in the slider component? i.e. 10.125 ~ etc. ? I need to build a slider for inches and fractions.

In the doc's I noticed the "data-decimal" attribute but when I added this nothing changed and the input value still rounded the numbers. Is there custom javascript needed to make this happen?

Foundation 6 / Slider

Is it possible to have decimal places in the slider component? i.e. 10.125 ~ etc. ? I need to build a slider for inches and fractions.

In the doc's I noticed the "data-decimal" attribute but when I added this nothing changed and the input value still rounded the numbers. Is there custom javascript needed to make this happen?

ha pham 10 months ago

oh nice

Blythe Events 10 months ago

it is possible to adjust the decimal slider in the component. 

jinch 10 months ago

If anyone is interested and wants a solution (not spam), just need to adjust the steps to the number of decimals.

Like so...

<div class="slider" data-slider data-options="precision:3; decimal:3; start:10; end:40; initial:20; step:0.001;">

<input type="number" step="0.001" id="x1">

_________________

Not sure whats up with this forum - nothing but spam lately.