Wijmo UI for the Web
KO InputMask Binding
Wijmo User Guide > Concepts > Integrating Frameworks > Knockout > Two-Way Live Binding > KO InputMask Binding

Data-binding options:

Example:

In this example, the ViewModel is defined specifically for use with the input mask. It has val and disabled properties that are bound in the View. If any of these values change, the widgets automatically respond to them. The widgets also update the ViewModel values as they modify them.

Create a ViewModel:

ViewModel Script
Copy Code
var viewModel = function () {             var self = this;     self.val = ko.observable('(412) 867-5309');    self.disabled = ko.observable(false);};

Create View with Bound Controls:

View Markup
Copy Code
<input data-bind="wijinputmask: {text: val, disabled: disabled, mask: '(999) 000-0000'}" />
See Also

Concepts

Widgets

Reference