insin / react-maskedinput

Masked <input/> React component
http://insin.github.io/react-maskedinput/
MIT License
730 stars 197 forks source link

Getting the pure value without the mask #69

Open shin-monkey opened 8 years ago

shin-monkey commented 8 years ago

Is it possible? Couldn't find any way to do it.

mohithg commented 7 years ago

Use , then when you need to get pure value use this.refs.masker.mask.getRawValue().

hhsadiq commented 7 years ago

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}/>
shin-monkey commented 7 years ago

@hhsadiq

  <MaskedInput  ref="masker"
                             mask="1111111111"
                             onBlur={this.validate}
                             className="form-control"
                             placeholder="Phone"
                             name="PHONE"
                             onChange={this.changeInput}/>