jQRangeSlider icon indicating copy to clipboard operation
jQRangeSlider copied to clipboard

valuesChanged event is not called when setting values programmatically

Open fracz opened this issue 11 years ago • 3 comments

According to the docs the valuesChanged event should be called, when the values are set programmatically. However, it does not work when using date range slider.

See demo for range slider and date range slider - alert is not displayed after the page has been loaded, but it should. It is displayed only after changing the slider's value.

fracz avatar May 14 '14 13:05 fracz

Thanks for reporting. I'll take a look.

ghusse avatar May 14 '14 13:05 ghusse

So, this version is actually displaying the alert:

http://jsfiddle.net/vM844/1237/

Why ? Because the slider must wait for the browser to render elements, in order to have correctly computed positions.

The second call happens but the slider is not really initialized yet.

I'm not sure I'll fix this very soon.

ghusse avatar May 14 '14 13:05 ghusse

I think that posting an initialized event from slider would do the trick as I would be able to detect appropriate moment to update the values.

fracz avatar May 14 '14 14:05 fracz