jackocnr / intl-tel-input

A JavaScript plugin for entering and validating international telephone numbers. React and Vue components also included.
https://intl-tel-input.com
MIT License
7.64k stars 1.95k forks source link

As you type formatter #1038

Closed gety9 closed 4 years ago

gety9 commented 4 years ago

Is there a option to enable formatter ?

For example on demo https://intl-tel-input.com/ mask is displayed as (201) 555-0123 but when user starts typing it goes as 2 20 201 2015

it's not UX friendly.

it should go (2 (20 (201) (201) 5

Is there a way to enable formatter ? Maybe something similar to what https://www.npmjs.com/package/google-libphonenumber has.

Basically to be UX friendly you don't have to make user put "() -" they should be added automatically. Some of users will start from typing "(2" some of users will start from typing "2" for both it should result as "(2"

jackocnr commented 4 years ago

This question has been answered many times - please search existing issues before creating a new one.

gety9 commented 4 years ago

I did search for formatting, type, nothing fresh was coming up.

For anyone looking for same thing seems like reasons for removing autoformat are explained here: https://github.com/jackocnr/intl-tel-input/issues/346