How to validate a Date field with JQuery

Hi Experts,
I am a Jquery newbie.  I am making a webpage where I am using date picker in Jquery to supply the calender for two input fields. I want to validate the date after the selection is done or the user types a date on his own.
Also the first input field is checkin and the second one is check out. So I need also make sure that they can't select the same date in the check out field as they do in check in date
can you please  help me figure this out?
Thanks in advance guys
LVL 1
guyneoAsked:
Who is Participating?
 
Samuel LiewCommented:
You could do something like this
foo50---Validate-DatePicker.html
0
 
Gurvinder Pal SinghCommented:
you need to parse the date into the date object and then check for equality (assuming that both dates are in different format, else just a if condition will suffice)
use Datejs for doing parsing
http://www.datejs.com/
0
 
Samuel LiewCommented:
Please post a link to your page.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
guyneoAuthor Commented:
@gurvinder I will give it a try. I am wondering if Jquery validate plugin will be able to do this with ease?
0
 
Samuel LiewCommented:
I don't mean to be rude, but the more information you provide to us regarding your problem the faster you will receive a solution that you can implement quickly, rather than having everyone to guess (or even skip over) your question. If you had provided your page code, somebody might have already coded the solution for you.

Regards
0
 
guyneoAuthor Commented:
No offense taken Sam. What you say is right.
However the developement machine and hence the webpage is not accesible from outside. So I can't post the link. I can post the relevant part of the form if that would help to get an idea of what I need.  It is a basic book/document library application   The webpage I am trying to validate is pretty simple. Regular Date fields: One field for checkOut and One for CheckIn.
0
 
Samuel LiewCommented:
Okay. What is the format of the date you are trying to validate? DD/MM/YY?
0
 
guyneoAuthor Commented:
Yes. or   DD/MM/YYYY
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.