I keep getting this error:
String was not recognized as a valid DateTime.
when I try to sumbit a form with this
[code=html]
<asp:TextBox ID="tbDate" runat="server"> </asp:TextBox>
<cc1:CalendarEx tender id="bdplPickupD ate" runat="server" TargetControlID ="tbDate" Format="MM-dd-yyyy" PopupButtonID=" tbDate">
</cc1:CalendarExt ender>
<asp:CompareVal idator ID="cvDate"
ControlToValida te="tbDate"
Display="none"
Text="Invalid Date!"
Operator="DataT ypeCheck"
Type="Date"
Runat="Server"
ErrorMessage="Y ou must provide a valid date!"
></asp:CompareVali dator>
<cc1:ValidatorC alloutExtender runat="server" ID="vceDate" TargetControlID ="cvDate">
</cc1:ValidatorCa lloutExtender>
[/code]
The cc1 stuff is Ajax, but it still does the same thing whether it is there or not. The compare validator should fire and keep the form from submitting if the date is invalid, but it keeps throwing the error (from above).
Basically I am just trying to check for a valid date.
String was not recognized as a valid DateTime.
when I try to sumbit a form with this
[code=html]
<asp:TextBox ID="tbDate" runat="server"> </asp:TextBox>
<cc1:CalendarEx tender id="bdplPickupD ate" runat="server" TargetControlID ="tbDate" Format="MM-dd-yyyy" PopupButtonID=" tbDate">
</cc1:CalendarExt ender>
<asp:CompareVal idator ID="cvDate"
ControlToValida te="tbDate"
Display="none"
Text="Invalid Date!"
Operator="DataT ypeCheck"
Type="Date"
Runat="Server"
ErrorMessage="Y ou must provide a valid date!"
></asp:CompareVali dator>
<cc1:ValidatorC alloutExtender runat="server" ID="vceDate" TargetControlID ="cvDate">
</cc1:ValidatorCa lloutExtender>
[/code]
The cc1 stuff is Ajax, but it still does the same thing whether it is there or not. The compare validator should fire and keep the form from submitting if the date is invalid, but it keeps throwing the error (from above).
Basically I am just trying to check for a valid date.
Comment