Open shoshani-ron opened 5 years ago
I have the same issue, with Canadian numbers. For me works next steps:
"webpack": "^2.7.0"
"fs-extra": "^7.0.1", "whatwg-fetch": "^3.0.0", "promise": "^8.0.2"
npm i
npm run build
dist
After this steps phone number inserted correctly.
While i was using the method handler(status, value, countryData, number, id) and in the IntlTelInput i added those attributes
<IntlTelInput //value={value} defaultValue={value} onPhoneNumberChange={this.handler} disabled={this.props.disabled} onPhoneNumberBlur={this.handler} style={{width: '100%', height: 36}} css={['intl-tel-input', 'telephone-input']} utilsScript={'libphonenumber.js'} />
the number that I'm getting from the handler is missing the area codes. so the result that the number is referring as a USA number
For example, the number that I'm entering inside the component is: +1613 XXX XXXX so the number that I'm getting from the handler is +1 XXX XXXX so when the component is rendering to this value it's considering it as USA number