Empty value and moving dash

3 posts, 1 answers
  1. Volker
    Volker avatar
    22 posts
    Member since:
    Jul 2013

    Posted 31 Jul 2014 Link to this post


    I have two issues with the masked textbox:

    1) I want to set the value to empty/null/"" when the page is shown. But the masked textbox does not accept that. If I enter any string, the value is set correctly, but I was not able to set an empty value.

    2) The format I use is "AAA-AAA". When I enter characters, the "-" in the middle is moving aroung depending on the width of the characters being used. Is there a way to use a fixed width for each character here?

    Thanks in advance, best regards,
  2. Answer
    Georgi Krustev
    Georgi Krustev avatar
    3747 posts

    Posted 01 Aug 2014 Link to this post

    Hello Volker,

    Straight up to your questions:

    Probably I am missing something, because the widget value method clears the input. Here is a simple Dojo demo, which shows this.

    In order to overcome this behavior, you will need to use a font-family with same width characters. Check the demo from point 1. It uses "monospace" font family.

    Georgi Krustev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Volker
    Volker avatar
    22 posts
    Member since:
    Jul 2013

    Posted 01 Aug 2014 in reply to Georgi Krustev Link to this post

    Thanks for the help! 

    Regarding #1
    It seems the browser sets some kind of cached text after the document is ready... So no Kendo issue (also I still do not understand this auto-fill...)

    Regarding #2
    I will give it a try, thanks for the hint!
Back to Top