I have a code which needs to trigger the input event manually on an input with a datepicker.
The code looks like:
input.on('apply.daterangepicker', function(e) {
input.trigger('input');
});
input.on('input', function(e) {
console.log('11111111111111111111');
});
document.getElementById('filter-created-at').addEventListener('input', function(e) {
console.log('22222222222222222222');
});
The first jQuery event listener works fine. But the second pure JavaScript does not catch the input event. Don't understand it. How can I catch input from trigger() with pure JavaScript addEventListener()?