You can either try using the unencoded value as described in the noUISlider documentation on events and their binding
slider.noUiSlider.on("update", function(values, handle, unencoded ) {
or another possibility uses the format parameter when creating the slider (but I have not tried it myself yet):
noUiSlider.create(slider, { start: [ 20000 ], ... format: wNumb({ decimals: 0, // default is 2 thousand: '.', // thousand delimiter postfix: ' (US $)', // gets appended after the number }) });
The downside is that you have to download the wNb library separately from here: http://refreshless.com/wnumb/ .
Another way without wNumb
After reviewing the examples from noUISlider again, I found this way for manual formatting (at the bottom of the page):
var sliderFormat = document.getElementById('slider-format'); noUiSlider.create(sliderFormat, { start: [ 20 ], ... format: { to: function ( value ) { return value + ',-'; }, from: function ( value ) { return value.replace(',-', ''); } } });
source share