webcat12345 / ngx-intl-tel-input

Phone number input field to support international numbers, Angular
MIT License
213 stars 333 forks source link

Uruguay flag on US +1 code #479

Open bernardodesousa opened 1 year ago

bernardodesousa commented 1 year ago

This is two problems in one:

  1. a phone number from Canada is being classified as a US number.
  2. the Uruguay flag is displayed instead of the US flag.

image

intl-tel-input: 17.0.19 How it's being used:

phoneInput = intlTelInput(input, {
  initialCountry: "BR",
  utilsScript: intlTelInputUtils,
  geoIpLookup: (success, _failure) => {
    $.get("https://ipinfo.io", () => {}, "jsonp").always((resp) => {
      let countryCode = (resp && resp.country) ? resp.country : "BR";
      success(countryCode);
    });
  },
  enableAutoCountrySelect: true
});