Questions tagged [react-native-textinput]

240 questions
0
votes
1 answer

How to set minimum and maximum number in TextInput in React Native?

I want to give a min value of 0 and a max value of 100, In between those values user can type, otherwise in between user cannot type. I tried validating the data when the onTextChanged events trigger but the UI is re-rendered giving the effect I…
0
votes
1 answer

TextInput to accept numbers, along with commas and decimal values

I wish to implement a TextInput such that it accepts the amount of money in different possible formats. For example: 250 2,50,000 2.50 Let's say I type in 2f50, it should be 250. If we type 2.5, it should remain 2.5 and for 2,50,000; it's…
Manish
  • 471
  • 1
  • 10
  • 22
0
votes
0 answers

How do you use returnKeyLabel?

I used returnKeyLabel instead of returnKeyType, but it doesn't work at all. I tried it on Android, and used a fixed value such as 'go'. Could it be a problem with the device? tell me your opinions.
ido han
  • 13
  • 3
0
votes
1 answer

How can I change the font size of the default font in React Native?

The font I use does not support every alphabet. For example, if the user uses Chinese letters, the default font is used instead of my font in the application. In this case, there is a problem. The appropriate fontSize value for my font is 24.…
0
votes
0 answers

react-native TextInput, how to mask the phone number to look like NN NNN NN NN

im using react native TextInput for the phone number, the client want the phone number to look like NN NNN NN NN, found a solution to do spaces for each 3 numbers but that was not enough. const handleCardNumber = (text) => { let formattedText =…
moe
  • 1
0
votes
1 answer

React Native - Increase view height as per text increases when keyboard open

I have created a view which has title and body. Everything works fine but when I add body and keyboard opens then text goes out of the view. Please help me as how can I increase the view height or scroll the view fully so that text must not be out…
0
votes
0 answers

how to Autofill Text Inputs in ReactNative

I am creating a Credit Card Form where on clicking in the Text Input of credit card number ,it has to auto fill all the credit card details like number, date of expiry, name in other text input fields. How to implement this using React Native? I…
0
votes
1 answer

React-Native unable to type in TextInput

I'm learning react-native, currently learning state. I have a TextInput on my screen: however, when I try to type in it the text doesn't appear. My code: const Login = ({ navigation } : any) => { const [text, setText] = useState(''); …
Code Ratchet
  • 5,758
  • 18
  • 77
  • 141
0
votes
0 answers

Adding Input Fields Dynamically in React Native Expo

In my application numeric input and button component are here. When I input a number in numeric input and press the add button, I need to generate text input fields according to the inputted number. const RequestSendingScreen = () => { //set…
ab_404
  • 61
  • 7
0
votes
0 answers

React Native Paper: Text Input, Check the render method of 'TextInputOutlined'

I was trying to create a text input for React Native that displays currency. For the Text Input, I have been using React Native Paper (RNP) and was pointed towards the RNP's Text Input Render method.
0
votes
0 answers

React Native showSoftInputOnFocus not working properly

I've two input fields in my application. setShowCalculator(true)} …
0
votes
2 answers

Input field needs to be tapped twice in React Native

I've two input fields in my application.
0
votes
0 answers

React Native - Dropdown Value change doesn't reset the state of the subcomponents

Let's say I have a RNPickerSelect component on which I switch between subcomponents. The values of the subcomponents are 1. Flight and 2. Car The problem is: If switch from flight to car, the state of the components inside Flight don't reset but…
0
votes
1 answer

React Native textInput clear

I have a textinput like this: setClave(val)} /> and the component is: const [clave, setClave] = useState(''); which is just for the…
0
votes
1 answer

React Native - useState - Text Input field is not clearing the first character from state after I delete all text from input

My problem is that when I enter on the airline textInput for example "TEST" and when I enter the delete keyboard button, the last character stays in the state ex: "T", but in view it shows like its fully deleted. With console.log(routes) I can see…