react-maskedinput
react-maskedinput copied to clipboard
Getting the pure value without the mask
Is it possible? Couldn't find any way to do it.
Use <Masker ref="masker" />, then when you need to get pure value use this.refs.masker.mask.getRawValue().
Hey @shin-monkey @mohithg can you give code example where you used this.refs.masker.mask.getRawValue(). Sorry I am new to react and could not figure out where to use it. This is my masked input
<MaskedInput mask="1111111111"
onBlur={this.validate}
className="form-control"
placeholder="Phone"
name="PHONE"
onChange={this.changeInput}/>
@hhsadiq
<MaskedInput ref="masker"
mask="1111111111"
onBlur={this.validate}
className="form-control"
placeholder="Phone"
name="PHONE"
onChange={this.changeInput}/>