Answer the question
In order to leave comments, you need to log in
Angular 5, how to catch programmatically changing the value of an input?
There is an angular application, there is a library (datetimepicker) that changes the value of input. The problem is that angular does not see such changes. The change happens like this
The model doesn't change.
Angular event (change) doesn't fire. The event (blur) fires, but at the time of its occurrence, the input contains the old value.
At the same time, the onchange js event works as it should.
In the first Angular, this problem was solved by a simple call
. But now it does not work.
Has anyone encountered such a problem? this.element.val(newValue).trigger('change');
$("selector").trigger("input");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question