May 13, 2013, 7:55 PM
[CLOSED] Applying InputMask dynamically on the client
Hi,
I'm looking for a way to apply an InputMask pattern dynamically on the client. The code below kind of works but it produces a mess and the results are incorrect. I'm also puzzled by the addPlugins() method. The initial type of the plugins object is Object but addPlugins() initializes an array.
I'm looking for a way to apply an InputMask pattern dynamically on the client. The code below kind of works but it produces a mess and the results are incorrect. I'm also puzzled by the addPlugins() method. The initial type of the plugins object is Object but addPlugins() initializes an array.
var applyMaskPlugin = function (myMask) {
TextField1.plugins = null;
if (!Ext.isEmpty(myMask)) {
var plugin = new Ext.ux.netbox.InputTextMask({ mask: myMask });
TextField1.plugins = plugin;
// TextField1.addPlugins(plugin);
TextField1.initPlugin(plugin);
}
};
<ext:TextField ID="TextField1" runat="server" SelectOnFocus="true"
ValidateOnEvent="true" EnableKeyEvents="true" AllowBlank="false" Width="270">
</ext:TextField>
Last edited by Baidaly; May 16, 2013 at 9:17 PM.
Reason: [CLOSED]