Problems copy/paste of a phone number

3 posts, 0 answers
  1. Steve
    Steve avatar
    6 posts
    Member since:
    Dec 2011

    Posted 04 May Link to this post

    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. Dinko
    Admin
    Dinko avatar
    414 posts

    Posted 09 May Link to this post

    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 allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Steve
    Steve avatar
    6 posts
    Member since:
    Dec 2011

    Posted 10 May in reply to Dinko Link to this post

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

Back to Top