Curious
Curious

Reputation: 53

MVVM and masked input

There is no masked input control in KendoUI framework. But I need to have a mask input capabilities for textboxes as well as for datepicker.

The application mostly based on MVVM with Kendo Templates. So I need a solution compatible with it.

What is the best way to go with our problem? Currently i'm looking at several solutions:

  1. Have a custom widget (as kendo plugin) that is connected with jquery.inputmask plugin.

  2. Have a custom binding that connects a widget and jquery.inputmask plugin

  3. Invoke a jQuery code $(..).input. The problem with this approach that it hard to get it invoked after template is rendered

Upvotes: 2

Views: 2184

Answers (1)

Vlad Omelyanchuk
Vlad Omelyanchuk

Reputation: 3101

Basically I the cleanest solution I can suggest you is to create custom Widget or extend one of the existing.

Take a look at the the following example we created - it demonstrates how to extend the datepicker widget custom logic:

http://jsfiddle.net/7JA74/10/

A part from this please notice there is some malfunctioning when a value is selected from the date picker.

Upvotes: 2

Related Questions