Slider decimal increment

UI Components for JSF
Post Reply
koc
Posts: 3
Joined: 19 Jun 2014, 17:49

02 Mar 2015, 18:16

How can I make te slider "step" atribute increment by some decimal value exp. step=0.5. I found some examples with jQuery but didn't work , any help? ty

koc
Posts: 3
Joined: 19 Jun 2014, 17:49

04 Mar 2015, 15:14

So I managed to get it to work with the in build atribute onSlide(event,ui).

<p:slider onSlide="onSlide(event, ui)" id="slder" for="blabla" minValue="50" maxValue="300" step="5" style="width: 450px"/>

I divide the value I get on slide with /10 and get the decimal number from the onSlide function and then show it to an output field

function onSlide(event, ui) {
var temp = ui.value / 10;
document.getElementById('slider:output2').innerHTML = temp
}

But now I have the problem with pm:inputSlider cause it has none such atribute :roll:

march2015
Posts: 1
Joined: 12 Mar 2015, 07:24
Contact:

12 Mar 2015, 07:27

i don't understand.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 55 guests