I am using asp.net 4.0. I have created a web user control for date validation. The date format which i am using is "dd-MMM-yyyy". This control has two textboxes and next to each textbox there is calender extender(Ajax control) and also i am using watermark extender for textboxes. So i want create control such that user either can not enter anything in textbox (Enabled="False") or if user enters date it should validate the date and if the dates are valid i have to compare dates.
When i am disabling textboxes to prevent user to enter text, i am getting textbox value as "null" in control. When i am allowing users to enter text i have to validate date. This problem i have solved some extent by using regular expression. But the main problem i am facing is comparing the two dates. I have used compare validator and i have used tried Jquery for this. When i am using compare validator, its comparing only days in date not whole date. And when i am using jquery, it is behaving different for diiferent browsers.
So please can anyone help me to solve this problem either with compare validator or Jquery.
Thanks in advance.