material-ui-phone-number icon indicating copy to clipboard operation
material-ui-phone-number copied to clipboard

how to get a country code and mobile number separately

Open tejasgaykar opened this issue 4 years ago • 3 comments

with autoFormat true, phone number is displayed differently for different country codes. For e.g.

  1. India: +91 29900-29909,
  2. US: +1 (929) 030-9390
  3. HongKong: +852 9399 3903

Is there any way to get country code and mobile number separately?

tejasgaykar avatar Apr 18 '20 17:04 tejasgaykar

use onChange=(e,value)=>{handleChange(e,value}. In Value parameter you get separate dialcode key and there selected value

nbbhatia avatar Jun 20 '20 11:06 nbbhatia

value is giving only : countryCode: "in" dialCode: "91" name: "India"

It is not giving mobile number separately. How to get that?

shahanshah87 avatar Mar 25 '21 18:03 shahanshah87