I have two date fields. One field is from date and second one is to date.
While the cursor moving from second date field to submit button, I have to compare the two dates.
if from date greater than to date it has to display error and has to empty the field and has to focus.
For example:
My date format is:MM-DD-YYYY
first date is:08-10-2015 and secondate is:08-15-2015 , if the date is like this it has to do nothing.
Suppose, if is in reverse like,first date is:08-15-2015 and secondate is:08-10-2015, it has to display error. how to do ?
AntonyRayan 15 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.