Created
January 24, 2019 14:15
-
-
Save tonysaffo/9327940dca6062ed49bb79d2f25e8975 to your computer and use it in GitHub Desktop.
Phone Mask React
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IMaskInput | |
name='phone' | |
mask='+{7} (000) 000-00-00' | |
radix="." | |
value={this.state.phone} | |
unmask="true" // true|false|'typed' | |
onAccept={ | |
// depending on prop above first argument is | |
// `value` if `unmask=false`, | |
// `unmaskedValue` if `unmask=true`, | |
// `typedValue` if `unmask='typed'` | |
(value, mask) => this.onChangeInputMask(value) | |
} | |
// ...and more mask props in a guide | |
// input props also available | |
placeholder='Телефон' | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment