Search code examples
ion-range-slider

ionrangeslider: disable drag the slider. Only want to use for display


I am using ionrangeslider to display some temperature value. I like the way it displays.

I dont want the user to slide it. How can i disable the slider

I didnt find any option to diable dragging

this is the html and the js i am using

                        <input type="text" class="js-range-slider" name="my_range" value=""
                            data-min="40"
                            data-max="210"
                            data-from="115"
                            data-grid="true",
                            data-hide-min-max="true",
                            data-postfix="'F"
                        />

                        $('.js-range-slider').ionRangeSlider()

It shows as enter image description here


Solution

  • if you want to fix the values top/from, you have option:

    to_fixed:true,//block the top
    from_fixed:true//block the from