DevExtreme Vue - Handle the Value Change Event
To process new RangeSlider values, you need to handle the value change event. If the handling function is not going to be changed during the lifetime of the widget, assign it to the onValueChanged option when you configure the widget.
JavaScript
$(function() { $("#rangeSliderContainer").dxRangeSlider({ onValueChanged: function (e) { var newStartValue = e.start; var newEndValue = e.end; // Event handling commands go here } }); });
If you are going to change event handlers at runtime, or if you need to attach several handlers to the value change event, subscribe to this event using the on(eventName, eventHandler) method.
JavaScript
var valueChangedHandler1 = function (e) { var newStartValue = e.start; var newEndValue = e.end; // First handler of the "valueChanged" event }; var valueChangedHandler2 = function (e) { var newStartValue = e.start; var newEndValue = e.end; // Second handler of the "valueChanged" event }; $("#rangeSliderContainer").dxRangeSlider("instance") .on("valueChanged", valueChangedHandler1) .on("valueChanged", valueChangedHandler2);
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
- RangeSlider Demos
- RangeSlider API Reference
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.