As a (sorta) follow on from the following question - CustomValidator time c#.net - I would like to know if it is possible to use the CompareValidator to validate a time in a ASP.NET textbox?
I have attempted the following
<asp:CompareValidator ID="CompareValidator2" Operator="DataTypeCheck"
ControlToValidate="txtTime" runat="server" ErrorMessage="* Valid time is required"
Type="Date" Display="Dynamic" ForeColor="Red"></asp:CompareValidator>
I assumed this would work since DateTime supports (obviously) both date and times but the validator continues to fail validation with valid inputs.
So, is it possible to validate time using the CompareValidator or is a RegularExpression or Custom Validator required?