convert a string to phone format? #103
-
Is it possible to convert a string to phone format? |
Beta Was this translation helpful? Give feedback.
Answered by
ArtyomVancyan
Aug 5, 2024
Replies: 1 comment 2 replies
-
Yes it's possible. Use import {getFormattedNumber} from "react-phone-hooks";
getFormattedNumber("9053200000"); // +90 (532) 000 0000
getFormattedNumber("9053200000").replace(/[()]/g, ""); // +90 532 000 0000 This library is dependant to |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can provide
country
property, specifying the ISO code of the country, but there is no option to show blank. By default, it sets and shows the country code and flag of a country the user is from.P.S. If you find the answer useful, please consider marking it as an answer so if others have similar questions, they will find it easily 🙂 For the same reason if you have any other questions not similar to this question, please create a new discussion.