Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canadian phone format incorrect #385

Closed
JasonMrX opened this issue Mar 6, 2016 · 5 comments
Closed

Canadian phone format incorrect #385

JasonMrX opened this issue Mar 6, 2016 · 5 comments
Labels

Comments

@JasonMrX
Copy link

JasonMrX commented Mar 6, 2016

This issue happens only when separateDialCode option is on

Steps to reproduce

  1. select canada(+1)
  2. input 519497xxxx(a Canadian phone number)
  3. save after internationalization => +1519497xxxx
  4. formatOnInit

Expected behaviour

Should be formatted to 519 497 xxxx

Actual behaviour

Formatted to 497 xxxx (3 digits NPA is cut off)
Place holder format is also problematic

Initialisation options

formatOnInit: true,
separateDialCode: true,
utilsScript: "path/to/utils.js"

@jackocnr
Copy link
Owner

jackocnr commented Mar 7, 2016

Thanks for this. I can confirm two bugs when separateDialCode is enabled:

  1. Setting initialCountry to "ca" will show an invalid Canadian placeholder (234-5678)
  2. Having the input's initial value as "+15194971234" will display an invalid number (497-1234)

@jackocnr jackocnr added the bug label Mar 7, 2016
@JasonMrX
Copy link
Author

JasonMrX commented Mar 7, 2016

I am still digging into the code. Seems to be an issue related to the areaCode. First time raising issue in Github.. May I try to fix this and make a pull request?

@jackocnr
Copy link
Owner

jackocnr commented Mar 7, 2016

Don't worry I'm on it.

@jackocnr
Copy link
Owner

jackocnr commented Mar 7, 2016

Should be fixed in v8.4.6. Let me know if you have any other issues.

Thanks again.

@jackocnr jackocnr closed this as completed Mar 7, 2016
@JasonMrX
Copy link
Author

JasonMrX commented Mar 7, 2016

That's fast! Works perfectly. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants