JavaScript trigger change event on input field code example
Example 1: jquery enable submit button
$("#submitButtonID").prop('disabled', true);
$("#submitButtonID").prop('disabled', false);
$("#submitButtonID").attr('disabled','disabled');
$("#submitButtonID").removeAttr('disabled');
Example 2: js input trigger change event when set value with js
var el = document.getElementById('changeProgramatic');
el.value='New Value'
el.dispatchEvent(new Event('change'));
Example 3: change the value in checkbox by button react
<input type="checkbox" checked={this.state.chkbox} onChange={this.handleChangeChk} />