3

I have an issue in react-native text input ios and I want to show a numeric keyboard. Here is the code that describes very well:

<TextInput
  keyboardType={'numeric'}
  onChangeText={(setCurrentValue) => this.setState({ setCurrentValue })}
/>  

but in ios shows a comma in the keyboard, as in the picture below:

enter image description here

Instead of that comma I want to show a dot. Somebody have an idea how to do without replace method in JavaScript?

Thank you!

Rajan
  • 1,512
  • 2
  • 14
  • 18
Fabio Plaka
  • 138
  • 2
  • 12
  • 1
    I think that's related to localisation settings of the user. But you could try either *keyboardType*: `decimal-pad` or `numbers-and-punctuation`. Latter one will offer both comma and dot (+ other characters) to be used. – Samuli Hakoniemi Apr 08 '20 at 10:09

1 Answers1

0

Your keyboard depend on region For example if you set your region from General > keyboard > language and region > to "Russia" you will get comma instead of dot. Set it to US you will get the dot instead of comma

Pramod
  • 1,835
  • 8
  • 14