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

Bug: Masking without thousand or decimal placeholder not working in MVVM

3 Answers 97 Views
MaskedTextBox
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 18 May 2016, 11:23 AM

Hi,

we can't use the MaskedTextBox in our MVVM project because there's a bug when masking with only digits & spaces (for example the simple mask "999"). The mask won't work because a function from Kendo UI seems to expect a thousand or decimal placeholder. This can be easily reconstructed in the MVVM demo for the MaskedTextBox:

http://dojo.telerik.com/exIYe

I just changed the mask to "999" and it is not working any longer. As far as I can tell, no combination without a decimal or thousand placesholder seems to work. Except "000" for example also seems fine, but the number shown is not masked the right way.

Could you please look into this?

Regards,

Steve.

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 18 May 2016, 01:44 PM
Hello Steve,

This scenario for the Kendo UI MaskedTextBox is explained in MVVM Important Notes:

http://docs.telerik.com/kendo-ui/framework/mvvm/overview#important-notes

You can also check the example for a custom MVVM binding:

http://docs.telerik.com/kendo-ui/controls/editors/maskedtextbox/how-to/MVVM/custom-mask-binding#customize-masks-through-mvvm-binding

Let me know if you need additional assistance.

Regards,
Stefan
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Steve
Top achievements
Rank 1
answered on 19 May 2016, 07:59 AM

Ok, thanks for your reply. Seems like quite the hassle to go through just for masking it to say "I just want numbers from 0 to 999". It works like this if you initialize the widget in JavaScript, doesn't it?

Anyways, I think I'll just use a SpinEditor with the spinners turned off. Seems like the easier way to me in my case.

Regards,

Steve.

0
Stefan
Telerik team
answered on 19 May 2016, 02:36 PM
Hello Steve,

You are welcome.

Yes, the widget will work with a numeric mask if you initialize it via JavaScript.

Also if you are using variable-length numbers without special formatting or masking, the Kendo UI NumericTextBox is a better solution:

http://docs.telerik.com/kendo-ui/controls/editors/numerictextbox/overview

Regards,
Stefan
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
MaskedTextBox
Asked by
Steve
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Steve
Top achievements
Rank 1
Share this question
or