MaskedTextBox - word as a mask

2 posts, 0 answers
  1. Dusan
    Dusan avatar
    2 posts
    Member since:
    Jan 2019

    Posted 24 Jan 2019 Link to this post

    Hi,

    I am having problems with setting mask for MaskedTextBox. My mask is something like this: mask={'Days:999 Hours:99 Minutes:99 Seconds:99'}, but letter 'a' is never rendering.

    my code: https://stackblitz.com/edit/react-maskedtextbox?file=index.js

    Is there any way to render full text?

     

    Thank you,

    Dusan

     

  2. Stefan
    Admin
    Stefan avatar
    2889 posts

    Posted 25 Jan 2019 Link to this post

    Hell0, Dusan,

    Thank you for the example.

    This occurs because the letter "a" is actually one of the special symbols for the mask:

    "a - Alphanumeric or space. Accepts letters, digits and space only."

    https://docs.telerik.com/kendo-ui/api/javascript/ui/maskedtextbox/configuration/mask#mask

    As I see that this is used for date, I can suggest using the DateInput component with a custom placeholder format:

    https://www.telerik.com/kendo-react-ui/components/dateinputs/dateinput/placeholders/#toc-placeholders

    https://www.telerik.com/kendo-react-ui/components/dateinputs/api/DateInputCustomFormatPlaceholder/

    If the DateInput is not an option, could you please share with us the limitation.

    Regards,
    Stefan
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top