formatting is not working as specified in libphonenumber
See original GitHub issueHi, I am using react-phone-number-input/basic-input as below : `` Using app created via create-react-app with no webpack. Now if I enter 20 the number formatted as (20 ) and caret goes after parenthesis. But as per below link https://libphonenumber.appspot.com/phonenumberparser?number=2071234567&country=US the number should only if I type (207) 123-45. Is there a way I can get the number formatted only after I type more then three char atleast.
Also when I try to use SmartInput as below:
`import PhoneInput from “react-phone-number-input/basic-input”;
import SmartInput from ‘react-phone-number-input/smart-input’
<PhoneInput
inputComponent={SmartInput}
className="react-phone-number-input__input"
country={region}
smartCaret={ true }
value={this.state.mobileNumber}
placeholder={this.props.intl.formatMessage(messages.phonePlaceholder)}
onChange={this.onUpdatePhone}
onBlur={event => this.onBlurValidate(event)}
/>
`
I get warning and it doesn’t work:
Warning: React does not recognize the inputComponent
prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase inputcomponent
instead. If you accidentally passed it from a parent component, remove it from the DOM element.
in input (created by InputBasic)
in InputBasic (created by InputBasicDefaultMetadata)
in InputBasicDefaultMetadata (at PhoneNumber.js:54)
in div (created by styled.div)
in styled.div (at PhoneNumber.js:53)
in PhoneNumber (created by InjectIntl(PhoneNumber))
Thanks Manish
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:13 (5 by maintainers)
Top GitHub Comments
gr8 response. thanks
oh ok. How long will it take. else I need to look into use other lib for fix yrs locally.
Thanks