I found the way to trigger the change event manually in jQuery but I need a way to access the widget in vue. I am using an on screen keyboard (https://www.npmjs.com/package/simple-keyboard) to insert the values into the numeric textbox. I am struggling to access the widget to raise the change event. I am using the Vue Native Numeric Textbox. Below is how to trigger it using jQuery.
<input id="numeric" value="123" />
$("#numeric").kendoNumericTextBox();var numerictextbox = $("#numeric").data("kendoNumericTextBox");
function changeValueFromCode(){
numerictextbox.value(40785);
numerictextbox.trigger('change');
}
Hello, Asheeqah.
Thank you for the provided details about the functioanlity you need to implement. Here is an example demonstrating how you can set the value of the NumericTextbox component using two different approaches.
The first approach uses the Controlled mode of the NumericTextbox and is the one we recommend. This approach uses the value prop of the component in combination with its change event. With this approach, to set the value of the component, you just need to set the new value of the data property controlling the value(in the shared example this is the numericValue data property.
The second approach that we don't recommend you to use is to get a reference to the component and use the triggerChange method that can be accessed through the ref.
I hope the above details will help you achieve what you need in your scenario.