Dec 14, 2015, 4:41 PM
[OPEN] [#1193] [3.2.1] DateField vs InputMask
On the following example, press Validate Form button. The field is marked as invalid, but field's AllowBlank is set to true.
In my opinion, field shoud not be marked as invalid when unmasked value retuns null and field's AllowBlank is set to true.
thanks in advance.
In my opinion, field shoud not be marked as invalid when unmasked value retuns null and field's AllowBlank is set to true.
thanks in advance.
<!DOCTYPE html>
<html>
<head runat="server">
</head>
<body>
<ext:ResourceManager ScriptMode="Debug" Locale="en-US" Theme="Crisp" runat="server" />
<ext:FormPanel Margin="10" ID="_frm" Title="Form" DefaultAnchor="100%" Width="300" Height="150" Border="true" runat="server">
<FieldDefaults LabelAlign="Top" MsgTarget="Side" />
<Items>
<ext:DateField FieldLabel="Custom Date" AllowBlank="true" runat="server">
<Plugins>
<ext:InputMask Mask="dt/mn/yzzz" InvalidMaskText="The value doesn't match the mask" runat="server">
<MaskSymbols>
<ext:MaskSymbol Name="d" Regex="[0123]" />
<ext:MaskSymbol Name="t" Regex="[0-9]" />
<ext:MaskSymbol Name="m" Regex="[01]" />
<ext:MaskSymbol Name="n" Regex="[0-9]" />
<ext:MaskSymbol Name="y" Regex="[12]" />
<ext:MaskSymbol Name="z" Regex="[0-9]" />
</MaskSymbols>
</ext:InputMask>
</Plugins>
</ext:DateField>
</Items>
<Buttons>
<ext:Button Text="Validate Form" runat="server">
<Listeners>
<Click Handler="#{_frm}.isValid();" />
</Listeners>
</ext:Button>
</Buttons>
</ext:FormPanel>
</body>
</html>
Last edited by Daniil; Dec 19, 2015 at 11:26 AM.
Reason: [OPEN] [#1193] [3.2.1]