Click here to Skip to main content
12,756,447 members (33,044 online)
Rate this:
Please Sign up or sign in to vote.

I am using 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.
Posted 3-Oct-12 5:02am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 3 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100