I need a client-side date validator on a text box.
BAM - Custom Validator. Operator="DataTypeCheck", Type="Date". Boo-ya.
Golden, except that all dates get input in the format dd-MMM-yy. This method works fine for "12/12/2009" but fails on "12-Dec-09".
So, how do I get client side validation of dates in whatever format I choose to enter them?
Culture is currently en-AU if that helps at all.
Any ideas appreciated, cheers.
Update
OK I've now got this:
<asp:TextBox ID="txtDate" Columns="10" runat="server"></asp:TextBox>
<asp:MaskedEditExtender ID="txtDate_MaskedEditExtender" runat="server"
CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="$"
CultureDateFormat="ddMMMyy" Mask="99-LLL-99" CultureDatePlaceholder="-" CultureDecimalPlaceholder="."
CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" ClearMaskOnLostFocus="false"
TargetControlID="txtDate">
</asp:MaskedEditExtender>
<asp:CalendarExtender ID="txtDate_CalendarExtender" PopupPosition="TopLeft" runat="server" Enabled="True" TargetControlID="txtDate" Animated="false" Format="dd-MMM-yy"></asp:CalendarExtender>
<asp:MaskedEditValidator ID="MaskedEditValidator1" runat="server"
ControlExtender="txtDate_MaskedEditExtender" ControlToValidate="txtDate"
ErrorMessage="Invalid Date" Display="Dynamic" Text="*" IsValidEmpty="true" EmptyValueMessage="*" EmptyValueBlurredText="*">*</asp:MaskedEditValidator>
But my masked edit validator is doing nothing.
Any ideas ?