Looking to incorporate a phone number input field with formatting in a reactive form. The desired format is (123) 456-7890.
For reference, check out this example link: https://stackblitz.com/edit/angular13-reactive-form-validation-y1qwmf?file=src/app/app.component.ts
Upon submission, the phone number input value appears as follows:
{ "phno": "(112) 345-66899" }
However, I would like the displayed value to be formatted as (112) 345-66899 and the raw control value upon submission to be:
{ "phno": "11234566899" }
Is there any way to achieve having two different values for display and raw value using a reactive form control?
Any assistance on this matter would be greatly appreciated.