PhilippStein / ng2-ion-range-slider

Ion Range Slider for Angular https://github.com/IonDen/ion.rangeSlider
MIT License
35 stars 39 forks source link

How to Reset Slider #25

Open pathmanabhankv opened 6 years ago

pathmanabhankv commented 6 years ago

I tried to reset Slide by change Model values its update but slider not reset. Like Inital slider Min value is 0 and i drag to 15 then i reset model value is 0 again but slider not move Zero . Please share sample code for reset slider

KenrySanchez commented 6 years ago

did you find the answer??

vtkumaresan commented 6 years ago

below code will solve prob temp, resetSlider(elementid) { const guestCountSlider = document.getElementById(elementid); const inputElem = guestCountSlider.getElementsByTagName('input')[0]; jQuery(inputElem).data('ionRangeSlider').reset(); }

pass slider element id as input to reset.

floraB90 commented 6 years ago

any update on this issue?

jgreenwayread commented 6 years ago

bump, any news on this?

hassansw commented 5 years ago

Solution Update function https://github.com/PhilippStein/ng2-ion-range-slider/tree/master/example

carmadrazo commented 4 years ago

You can use the methods reset(), update() and destroy() now. You can check them out here: http://ionden.com/a/plugins/ion.rangeSlider/start.html --> Using public methods :)