This is a migrated thread and some comments may be shown as answers.

Problems copy/paste of a phone number

2 Answers 260 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 04 May 2017, 06:41 PM

Using the RadMaskedTextInput with Mask="(###) ###-####",  I type in a phone # of (111) 222-3333, then copy it. The clipboard has "(111) 222-3333", but when I paste it into another RadMaskedTextInput control with the same properties or even copy it back to the same control the result value is "(111)  22-2333".  It doesn't seem to know what to do with the space between the ")" and the "2". Is there some property I need to set to make the control work properly? 

Yes, I know I can extend the control and override the HandlePaste to remove the spaces of the clipboard text before pasting into the control, but there must be another way to make it work.

Thanks in advance.

Steve

2 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 09 May 2017, 10:19 AM
Hello Steve,

Thank you for contacting us.

You have hit a known issue in MaskedInput. It is already logged in our Feedback Portal where you can track its progress.

A workaround which you can try is to restrict the input of the RadMaskedTextInput to take only digits. To do that you can change the Mask property of the control. Check the following code snippet.
<telerik:RadMaskedTextInput EmptyContent="Enter digits" Mask="(d3) d3-d4" />
You can take a look at the Numeric format codes section in the Mask Tokens help article for further
information.

Give this approach a try and let us know if it works for you.

Regards,
Dinko
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
0
Steve
Top achievements
Rank 1
answered on 10 May 2017, 06:52 PM

Thank you. Changing the Mask to "(d3) d3-d4" worked for us.

Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Steve
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Steve
Top achievements
Rank 1
Share this question
or