kendo-uimaskedinput

cannot paste number into kendo masked input unless the mask is selected first


Here are two examples. My fiddle, where pasting a 10-digit number does not work unless the mask is first selected, and then a working example, where a phone number can be pasted without first selecting the mask. What must I do to allow the 10-digit number to be pasted in the same manner in my fiddle?

Here the mask must be selected first if you want to paste 0123456789 : https://jsfiddle.net/o819awpa/

 <input id="tendigit" maxlength="10" />


$(document).ready(function () {

        $("#tendigit").kendoMaskedTextBox({
                mask: "0000000000"                    
            });

});

Working example, where you can paste 212-555-9999 without first selecting the mask:

http://demos.telerik.com/kendo-ui/maskedtextbox/index


Solution

  • You need to remove the maxlength="10" attribute. This is causing the issue, exactly why I have not determined. Nothing is lost by doing this since the mask will ensure the length is not exceeded.