ng2-ion-range-slider icon indicating copy to clipboard operation
ng2-ion-range-slider copied to clipboard

How to Reset Slider

Open pathmanabhankv opened this issue 7 years ago • 6 comments
trafficstars

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

pathmanabhankv avatar Mar 28 '18 13:03 pathmanabhankv

did you find the answer??

KenrySanchez avatar Apr 09 '18 06:04 KenrySanchez

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.

vtkumaresan avatar Jun 15 '18 14:06 vtkumaresan

any update on this issue?

floraB90 avatar Jul 02 '18 06:07 floraB90

bump, any news on this?

jgreenwayread avatar Sep 10 '18 22:09 jgreenwayread

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

hassansw avatar Oct 24 '19 07:10 hassansw

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 :)

carmadrazo avatar May 20 '20 09:05 carmadrazo