insin / react-maskedinput

Masked <input/> React component

Home Page:http://insin.github.io/react-maskedinput/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting the pure value without the mask

shin-monkey opened this issue · comments

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

Use , 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}/>