I am using the edit mask extender and validator and the asp validator and the extender for that. On the registration wizard. If I press next without ever ssetting focus in the date field I do get the ValidatorCallOut as I should. But if I tab through it
the edit mask is set and does not clear when it loses focus. Then pressing the next button does not call up either validation message.hat is the correct format?
dieseldave
Member
384 Points
434 Posts
Date Edit mask
Apr 14, 2012 10:55 AM|LINK
I am using the edit mask extender and validator and the asp validator and the extender for that. On the registration wizard. If I press next without ever ssetting focus in the date field I do get the ValidatorCallOut as I should. But if I tab through it the edit mask is set and does not clear when it loses focus. Then pressing the next button does not call up either validation message.hat is the correct format?
<asp:TextBox ID="dob" runat="server" Width="120px" /> <asp:MaskedEditExtender ID="dob_MaskedEditExtender" runat="server" ClearTextOnInvalid="True" CultureAMPMPlaceholder="" ClearMaskOnLostFocus="true" CultureCurrencySymbolPlaceholder="" CultureDateFormat="en_US" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" Mask="99/99/9999" MaskType="Date" TargetControlID="dob" UserDateFormat="MonthDayYear" Century="2000" ErrorTooltipEnabled="True"> </asp:MaskedEditExtender> <asp:MaskedEditValidator ID="MaskedEditValidator1" ControlToValidate="dob" ControlExtender="dob_MaskedEditExtender" runat="server" Display="Dynamic" ErrorMessage="Invalid Date" IsValidEmpty="False" SetFocusOnError="True" ToolTip="Enter birthdate mm/dd/yyyy"></asp:MaskedEditValidator> <asp:CalendarExtender ID="dob_CalendarExtender" runat="server" Enabled="True" TargetControlID="dob" PopupButtonID="imgCal"> </asp:CalendarExtender> <asp:Image ID="imgCal" runat="server" ImageUrl="~/Images/Icons/calendar.png" ToolTip="Open/Close Date Picker" /> <asp:RequiredFieldValidator ID="dateRequired" runat="server" ControlToValidate="dob" CssClass="failureNotification" ErrorMessage="Birthdate is required" Display="None" ValidationGroup="RegisterUserValidationGroup" /> <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server" TargetControlID="dateRequired" > </asp:ValidatorCalloutExtender>hiza808
Member
270 Points
75 Posts
Re: Date Edit mask
Apr 15, 2012 07:59 PM|LINK
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/MaskedEdit/MaskedEdit.aspx
YunJiang
Participant
1124 Points
122 Posts
Re: Date Edit mask
Apr 29, 2012 01:55 AM|LINK
You need to set IsValidEmpty="true" on MaskedEditValidator or set ValidationGroup="RegisterUserValidationGroup" on next button