Anshuman Jasrotia
Anshuman Jasrotia

Reputation: 3185

Change the mask of Kendo MaskedTextBox in angular

I am using the below code to set up the Kendo MaskedTextBox

<input type="text" kendo-masked-text-box k-mask="contact.Mask"  ng-model="contact.PhoneNumber" />

In my angular Mask is initially set to empty and then I change it in a function. Example :

$scope.contact.Mask = '';
$scope.changeMask = function(){
    $scope.contact.Mask = '(999) 000-0000';
}

Calling this function does change the value of $scope.contact.Mask but the actual textbox does not reflect the change.

Please let me know in case any other information is requried.

Upvotes: 1

Views: 1705

Answers (1)

Satyajit Shetye
Satyajit Shetye

Reputation: 100

Use k-rebind="contact.Mask". This should solve your problem.

Upvotes: 3

Related Questions