🇨🇦Canada @Debra

Account created on 7 February 2008, almost 17 years ago
#

Recent comments

🇨🇦Canada Debra

I was able to remove the decimals by modifying bef_sliders.js and in the format setting when creating the slider, apply the parseInt function to the 'to' and 'from' values.

noUiSlider.create(slider, {
              range: {
                'min': parseFloat(sliderOptions.min),
                'max': parseFloat(sliderOptions.max)
              },
              step: parseFloat(sliderOptions.step),
              animate: !!sliderOptions.animate,
              animationDuration: parseInt(sliderOptions.animate),
              orientation: sliderOptions.orientation,
              start: [defaultMin, defaultMax],
              format: {
                // 'to' the formatted value. Receives a number.
                to: function (value) {
                  //return Math.trunc(Number(value));
                  return parseInt(value);
                },
                // 'from' the formatted value.
                from: function (value) {
                 // return Math.trunc(Number(value));
                 return parseInt(value);

It would be nice if this was a setting in the Exposed Filter Settings section of the view.

Production build 0.71.5 2024