onChange in jQuery Input Mask does not work

0

I have a React component for user registration, in some of the fields I added a Jquery mask, but since I added the mask, the onChange command has stopped working (only in the fields with the mask)

one of the fields is this:

<input type="text" className="form-control nascimento-cliente" id="nascimento"  name="nascimento" onChange = {(event) => this.onChange(event.target) } />

The function that onChange is calling:

onChange(target) {
    const change = {};
    change[target.name] = target.value;
    this.setState(change);
}

If I remove the mask everything works, but in some fields the mask is essential

    
asked by anonymous 08.06.2018 / 21:52

0 answers