React Native Input component takes ony numeric values

Ali Zeynalov picture Ali Zeynalov · Nov 16, 2016 · Viewed 14.6k times · Source

In React-Native project, I have an Input component from Native Base and I want to this component to take only numeric values 0-9 and give this field default value, I looked for other questions about this issue, I do not know maybe those answers are for 'textInput' component or somehow suggestions did not work for me? Can you help me please?

Answer

Muhammad Rosyid picture Muhammad Rosyid · May 31, 2018

try use

keyboardType="numeric"

source