mardi 27 août 2019

How to get the formatted number with country code when disabledFormatting is false

I am developing a laravel project with vue js components. I am using EducationLink/vue-tel-input for phone input. I don't want to display the formatted number in input field. so I add prop :disabledFormatting as false. but I want the formatted number. How can I get it?? Please help me.

I use onInput function as

onInput(formattedNumber, { number, isValid, country, international }) {
    this.phone.number = number;
    this.phone.isValid = isValid;
    this.phone.country = country && country.name;
    this.phone.formattedNumber = formattedNumber;
},

But when I console this.phone.formattedNumber it will give the normal number. I want a number like +91 1234 567 890 this but i got 1234567890. I am using "vue-tel-input": "^3.0.0"



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire