intl-tel-input: initial country fixed or auto does not have the same behavior
Steps to reproduce
set field value to something wrong
set params to { initialCountry: 'auto', geoIpLookup: function(callback) { callback('us'); } }
Expected behaviour
The selected country should be ‘us’, just as if the params where
{ initialCountry: 'us' }
Actual behaviour
Country is not filled, therefore cause errors later on .intlTelInput("getNumber")
Initialisation options
all default except specified.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (8 by maintainers)
Otherwise I highly recommend you either store the number in standard international format (including the international dial code), or store the country code as well, so that when displaying the number again, you can be sure you set the correct country.