IonDen / ion.rangeSlider

jQuery only range slider
http://ionden.com/a/plugins/ion.rangeSlider/en.html
MIT License
2.55k stars 506 forks source link

Allow typing input-values #778

Open hillenbc opened 2 years ago

hillenbc commented 2 years ago

Sometimes the automatic grid-steps are too wide apart, so that the graphic input-selection is not sufficient. It would be a nice enhancement to allow typing the input-numbers, e.g. activate input-field by clicking on the input numbers like it is available in Spotfire.

StenLeinasaar commented 2 years ago

First, you can set the grid to false so there are no default steps, or you can set steps to be specific values yourself. This is highly customizable.

With callback functions, you can make some random boxes update their value when the slider is updated. I used the onChange callback function that they have.

In terms of updating a slider when input is manually set, that requires some more function calls and setting JS variables, but it is also doable. You could set a global variable and use this to set the to and from value. Then update those values with callbacks and that way you can update them when the user inputs some value as well.

I hope that helps.

hillenbc commented 2 years ago

Hi @StenLeinasaar, Thanks for your reply on this and apologies that I did not answer earlier! But, frankly, I myself did not know how to do any of this, but I am have pointed experienced programmers to your answer, maybe it will help! Thanks again!