Hi,
I'm trying to validate user input date using range validator on a text box .
This code is throwing this exception
"The value 'DateTime.Now;' of the MaximumValue property of 'rvQDate' cannot
be converted to type 'Date'. "
<asp:TextBox ID="txtQDate" runat="server" Enabled="False" ></asp:TextBox>
<asp:Image ID="iQDate" runat="server" ImageUrl="~/images/Calendar.png"
Visible="False" />
<cc1:CalendarEx tender ID="calQDate" runat="server" BehaviorID="cal QDate"
TargetControlID ="txtQDate" PopupButtonID=" iQDate" Format="dd/MM/yyyy">
</cc1:CalendarExt ender>
<asp:RangeValid ator ID="rvQDate" runat="server" ControlToValida te="txtQDate"
Display="Dynami c"
ErrorMessage="I nvalid QDate." MaximumValue="D ateTime.Now;" Type="Date"
CultureInvarian tValues="True"> *</asp:RangeValida tor>
How can I solve this ?
I'm trying to validate user input date using range validator on a text box .
This code is throwing this exception
"The value 'DateTime.Now;' of the MaximumValue property of 'rvQDate' cannot
be converted to type 'Date'. "
<asp:TextBox ID="txtQDate" runat="server" Enabled="False" ></asp:TextBox>
<asp:Image ID="iQDate" runat="server" ImageUrl="~/images/Calendar.png"
Visible="False" />
<cc1:CalendarEx tender ID="calQDate" runat="server" BehaviorID="cal QDate"
TargetControlID ="txtQDate" PopupButtonID=" iQDate" Format="dd/MM/yyyy">
</cc1:CalendarExt ender>
<asp:RangeValid ator ID="rvQDate" runat="server" ControlToValida te="txtQDate"
Display="Dynami c"
ErrorMessage="I nvalid QDate." MaximumValue="D ateTime.Now;" Type="Date"
CultureInvarian tValues="True"> *</asp:RangeValida tor>
How can I solve this ?
Comment