tb / ng2-nouislider

Angular2 noUiSlider directive
http://tb.github.io/ng2-nouislider/
MIT License
185 stars 114 forks source link

How to prevent update of a slider if value is too big. #206

Open kotfilemon opened 5 years ago

kotfilemon commented 5 years ago

hello,

my case requires me to have slider with set min and max shown always (let say from 0 to 5) but sometimes, affter custom validation I should never allow user to set value bigger than, let say 3.

what I am looking for is to hook up into update/set method, get the new value, validate it somehow (this part is easy, I have done it) and then, if it passes validation set it, if not, reject new value and show the user old value (if, it was set).

any idea?

thanks