Hello and welcome.
Are you asking how to force the textbox to display a phone number in a specific format? If so, you could do the format checking and setting based on when an event occurs (eg., lost focus, pressed enter, change).
Please have a look at the docs on events and feel free to share the code you have tried as this may help to make things clearer.