-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
formatting doesn't work #701
Comments
Hi, please can you be specific about what your use case - exactly when do you want the number to be formatted? If it's when you init the plugin with an existing number in the input, then that's controlled by We have completely removed the format-as-you-type functionality. |
You meen that formatting when typing and pasting is removed from plugin? I need some. It's not working with or without formatOnDisplay option. It's about first part.
Here, intlNumber variable still have full formatted number +7 999 999 99-99, but national must be only 9999999999, right? And it's always in +7 999 999 99-99 format with any type numberFormat. My init code:
|
Yes. We mention this in the template when you create a new issue here on Github (and there's a link to more info). As for using |
Yes, it's about valid number. I'm using external libphonenumber.js (fork of google) for formatting to national mode. |
I'm afraid I can only offer support for the utils.js provided by this plugin. If you're having problems with another lib, you'll have to open an issue with them. I have just double checked, and you can indeed extract just the national number using the provided utils.js. If you go to the demo site, enter a valid number, open dev tools and type |
Ok, thank you. Just one last question. How to rebuild your utils.js? |
There are instructions at the top of src/js/utils.js on how to re-build it. But as I said, the plugin no longer supports format-as-you-type, so even if you re-add that code in utils.js and re-build it, that feature will still not work as the code has been removed from src/js/intlTelInput.js. For more info on why we removed it, see this thread: #346 |
even the demo does not return |
It works for me. If I go to intl-tel-input.com, open devtools console and type |
facing the same issue. Any workaround? |
The full_phone is gonna do the trick.It will append a hidden field with full number when submitting the form
|
Hello. I'm using all of examples, and formatting number is not work. Only when i download another utils.js it's work fine with input.val(input.intlTelInput("getNumber");
Another utils from demo's: http://formvalidation.io/examples/validating-international-phone-numbers/
And when i tried to add unformatted it still formatted. input_hidden.val(input.intlTelInput("getNumber", intlTelInputUtils.numberFormat.E164). It doesn't work with any numberFormat.
Always return some like "+7 963 555-55-55". But I need without symbols and country code.
The text was updated successfully, but these errors were encountered: