c# - Date Input Validator (dd-MMM-yy, client side) ASP.NET 3.5 + MaskedEditValidator -
I need a client-side date verifier on a text box BAM -. Custom Validator Operator = "datatize check", type = "date" Boo-ya. Golden, except that all dates format takes input in DD-MMM-wai This method works well for "12/12/2009", but "12 December failed to -09" It happens. So, how do I get client-side verification in all formats, which I choose to enter them? The culture is currently N-Au if it absolutely helps. Any ideas appreciated, Cheers. Update OK I have now found this; & Lt; ASP: Masked Adetector ID = "txtDate_MaskedEditExtender" runat = "server" cultureAmpPiloader = "" Culture Carpenthil stone placeholder = "$" cultured format = "DDMMAMI" mask = "99-LLL-99" cultured placeholder = "-" Culture decimalloader = " . " CultureThousandsPlaceholder = "" CultureTimePlaceholder = "" enabled = "true" ClearMaskOnLostFocus = "false" TargetControlID = "txtDate" & gt; & Lt; / ASP: MaskedEditExtender & gt; & Lt; ASP: CalendarExtender id = "txtDate_CalendarExtender" PopupPosition = "TopLeft" runat = "server" enabled = "true" TargetControlID = "txtDate" animated = "false" format = "dd-mmm-yy" & gt; & Lt; / ASP: CalendarExtender & gt; & Lt; ASP: MaskedEditValidator id = "MaskedEditValidator1" runat = "server" ControlExtender = "txtDate_MaskedEditExtender" ControlToValidate = "txtDate" Error = "Invalid date" Display = "dynamic" text = "*" IsValidEmpty = "true" EmptyValueMessage = "*" Empty Velublrt text "=" * "& gt; * & lt; / asp: Maskdaditvidetr & gt; but my masked editing verifier is nothing.
There are several input controls which apply the 'mask', which That every On Unjipres any input characters disables that does not match the mask.
Microsoft ASP.Net AJAX Control Toolkit.
If you enter as a mask At a glance I can not see in a way that allows you to be flexible in order to have two different formats, but control makes it clear what format is necessary. I suggest you play with it Defense to see what is possible. The ability to easily provide a pop-up calendar can also be helpful.
Comments
Post a Comment