Round values to whole numbers on labels above handles on Continuous Range Slider

Question:
How do I force the values shown in the labels above the handles in a Continuous Range Slider to only show round whole numbers?

Product:
Wix Editor

What are you trying to achieve:
I am trying to ensure that the built-in labels above the handles on a Continuous Range Slider in Wix only show whole numbers. Despite using Velo code to round the values, the labels still display decimals even though the dataset only has whole numbers. I’m not sure where it’s even getting the decimals from except between the numbers displayed. How can I fix the current labels of the handles to show only whole round numbers without adding new text elements or changing it to a Stepped Slider?

What have you already tried:
I’ve tried all the Velo code fixes for Math.round and what not but still no change. I don’t know what the labels are named, since they are part of the Wix element, so I can’t code based on the value of the label name either. Does anyone know the what these values are called in the code or how to force them to only show round numbers? If I slide the Range Slider, it does show whole numbers among the the ones with decimals so I know it’s possible. If I need to add a suffix to make it work I’m fine with adding that too but I can’t find that option anywhere on the Continuous Slider Settings.

Thanks!

Additional information:
See Images below of what I am trying to achieve. Such a simple thing that should be easy to fix but can’t seem to find access to the labels of the range slider.

As a handle slides left or right along a continuous slider, the selected value always increases or decreases by 0.1

Do you have a specific requirement that prevents you from using a stepped slider?

With a stepped slider, you can change the step type and step value to control the slider values to only land on whole numbers.

1 Like