1

I have a form of tour application that has 2 dates, from date and To date. now i'm using the dd/MM/yyyy format for the date entry and i need to Validate To date like To date must me greater than or equal to start date. earlier days should be disable, i want to do that with compare validator..

Currently i'm using textbox with ajax control toolkit calendar.

So please help me if anybody have some hints.

Thanks in advance

Zeeju
  • 99
  • 1
  • 11

1 Answers1

0

you can try as bellow:

<asp:CompareValidator ID="cmpVal1" ControlToCompare="txtStartDate" 
         ControlToValidate="txtEndDate" Type="Date" Operator="GreaterThanEqual"   
         ErrorMessage="*Error message" runat="server"></asp:CompareValidator>

but there can be issue with date format, Check this answer for more information.

Community
  • 1
  • 1
Damith
  • 62,401
  • 13
  • 102
  • 153