I need to show dashes as hints and need to have equal spacing after some digits in Text Input similar to the picture attached .
Do I need to use separate text inputs for these or is it possible to achieve this in a single input text field? The user should be able to enter the number in a single go.
Asked
Active
Viewed 484 times
0

Nizami
- 227
- 1
- 5
- 15
2 Answers
0
If you know phone number format you can do it manually in one input. You are saving it as a real number, but displaying it with spaces. If you can have various formats, from various countries you can use this package https://www.npmjs.com/package/react-native-phone-number-input

Alija Fajic
- 556
- 6
- 17
0
The best way to achieve that is by using mask input you can use react-native-mask-input
library to do it you can check the library from here.

Louay Sleman
- 1,794
- 2
- 15
- 39