-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to detect out of limits values? #50
Comments
I can't get your requirement.. |
Yes. My case occurs when the user clicks in the label (in the middle of the slider) and writes the value in the input. By doing this, the user can put any value (101 in the example). The slider does what is expected, and turns the value back to 100 - its limit. I was wondering if there's a way to get notified if it happened because I need to notify the user that I have had to rollback the value written. Thanks! |
Currently I have prepared a workaround to achieve your requirement. Check the below code, which needs to be included in your sample:
So when you enter a large value in the center textbox, it will raise an event outOfRange. In that event arguments you will get the required values, so based on that you can notify to the user. Also in that event if you return as "false" then it won't change the value. Check the below demo, hopes it will helps you: http://jsbin.com/fogewaj/edit?html,console,outputCheck the demo and let me know your comments. |
Excellent! Works perfectly!!! It closes my issue. |
Good 👍 :) , so I will include this event in source level, in the next version. |
Is there a way to detect if the user has set a value grater or lesser than slider's limit. For example, if my limits are 0-100, there's an event where I can say that the value is out of bounds, if the user sets 101?
The text was updated successfully, but these errors were encountered: