RobinHerbots / inputmask.phone

Phone alias for Inputmask
MIT License
6 stars 9 forks source link

Create a phone mask with countrycode #6

Open cloudy-reports opened 6 years ago

cloudy-reports commented 6 years ago

Hello, I use Ubuntu 16.04, FireFox 60.0.2(64bit) and I have a next source code for using phone inputmask

HTML

JS $(this).inputmask({ alias: "phone", countrycode: "7" });

After loading a page I can see the element without a mask(placeholder). After I have got a focus on the element I can see a "phone" as word in placeholder of element, but I can't enter any characters into the element. But I need to have a mask or masks for selected country. Inform me please, how i can to do it.

When I use a static mask such as mask: ['+9(999) 999-9999', '+999 99-99-9999', '+999 99-999-999', '+99(999)999-99-99'] in this case I haven't a any problems. Help me please. Thanks.

P.S. I have included a next js files: inputmask.phone.extensions.js phone.js jquery.inputmask.js jquery.inputmask.bundle.js

Version is the last(4.****).

cloudy-reports commented 6 years ago

Hello, can You get response on my request. Thanks.

RobinHerbots commented 6 years ago

@cloudy-reports ,

Sorry for the late reply but I am very occupied with other things.

When you see the phone as placeholder that means there is something wrong with loading the phone extension. If you create a jsfiddle or codepen with the code I can have a look at it.

cloudy-reports commented 6 years ago

Hello, I have found a problem with incorrect work of phone mask. Need to include jquery.min.js. https://jsfiddle.net/rhz4qpkj/ But I have found a two new problems: 1) I cannot enter a Germany phone number, because after entered 49 I have see 409. Why? 2) I try to add option countrycode: "276" or another country code and after that I haven't see a related phone mask.

I have use phone.js Version: 4.0.1-beta.14

cloudy-reports commented 6 years ago

Hello, can You send a response on my request, please? Thanks.

cloudy-reports commented 6 years ago

Dear RobinHerbots, let me know if Your need my assistance for create a solution of this problem. I will be glad to help for You.