Range control not disabled in form

Range control not disabled in form

  
I am using the range select control from SilkUI in a form.

How can I disable the control when the field may not be editted? The control itself has no enabled property.
Setting the disabled propery of the input (or inputs) within the range control does not work.
Hello Johan!

From what I understand the SilkUI RangeSlider uses the JQueryUI,

By checking the  API ( http://api.jqueryui.com/slider/#method-disable ) you can see that you can disable the slider by Javascript, and by a quick test i was able to disable the slider by doing the following code:

$(".SliderRange").slider("disable");

So just do your selector inside the form like $(".Form .SliderRange") and at least you can disable/enable the sliders by Javascript :)

Don't know if this helps but feel free to add any follow up questions you might have.
Hi Sousa,

Thanks, I will implement that.
Hope OutSystems will solve it though.

Frederico hi,

I am JavaScript challenged, let's call it like that. Could you shortly explain what I need to do to disable the range slider and enable it back again?

Thanks ahead,

Wilko

Hello!

It seems SILKUI is not using https://api.jqueryui.com/slider/ anymore but it's using https://refreshless.com/nouislider/ now (you can see this by opening the javascript of the range slider block).

So it seems that now, disabling the range slider works with having the attribute disabled at true in the range slider, and the class for the range slider is still "SliderRange".

So now if you do $('.SliderRange').attr("disabled",true); it disables the slider, and if you do $('.SliderRange').removeAttr("disabled"); it enables it back again.

Remember that this will do it for every range slider in the page, if you want specifically just for one, use the Id or a more specific CSS.

Regards,

Fred Sousa