I need to have a React Native TextInput component that will only allow numeric characters (0 - 9) to be entered. I can set the keyboardType to
TextInput
keyboardType
Here is my other simple answer to accept only numbers in the text box using Regular Expressions.
onChanged(text){ this.setState({ myNumber: text.replace(/[^0-9]/g, '') }); }