Nov 29, 2012, 8:36 PM
As avoid erasing data when it loses focus with plugin InputMask
Working with the plugin InputMask noticed that if I do not complete all formatting asking me in shaping mask TextField control to lose focus and cleaned what had been written previously. My concern is how to keep the data are not cleaned and writings.
Ext.net 2.1
Ext.net 2.1
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server"></ext:ResourceManager>
<ext:Window
runat="server"
Width="550"
Height="350"
AutoHeight="true"
Title="Input Mask"
Closable="false"
Layout="Form"
BodyPadding="5">
<Defaults>
<ext:Parameter Name="LabelWidth" Value="200" />
</Defaults>
<Items>
<ext:TextField runat="server" Note="99,999,999,999" FieldLabel="Phone">
<Plugins>
<ext:InputMask runat="server" Mask="99,999,999,999" ClearWhenInvalid="false" AllowInvalid="false"/>
</Plugins>
</ext:TextField>
<ext:TextField runat="server" Note="(999) 999-9999?+99999" FieldLabel="All symbols after '?' are optional.">
<Plugins>
<ext:InputMask runat="server" Mask="(999) 999-9999?+99999" />
</Plugins>
</ext:TextField>
</Items>
</ext:Window>
</form>
</body>
</html>