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

Empty value and moving dash

2 Answers 219 Views
MaskedTextBox
This is a migrated thread and some comments may be shown as answers.
Volker
Top achievements
Rank 1
Volker asked on 31 Jul 2014, 08:57 PM
Hi, 

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,
Volker

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 01 Aug 2014, 09:12 AM
Hello Volker,

Straight up to your questions:

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

#2:
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.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Volker
Top achievements
Rank 1
answered on 01 Aug 2014, 07:48 PM
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!
Tags
MaskedTextBox
Asked by
Volker
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Volker
Top achievements
Rank 1
Share this question
or