I have the following function which compares the two dates coming from a form. (it fills the day,month,year dropdowns and gets the values from there to compare) I want the script also check if the check-in date (starting) is earlier than today.
I tried to find some scripts on the internet to make it but didn't work.
I'll be glad if anyone can help.

The stuff above wrapped in comment lines... why are you doing all of that? You only want to make sure the end date is >= start date, right? And the date components are already handily stored in variables, so...

At least once per year, some group of scientists will become very excited and announce that whatever they announced last year about global warming is wrong.

telmessos

06-11-2008, 02:21 PM

I am not good at Javascript. This script code is ready and working without any problems to check if the start date is later than the end date. What I need is adding another check, to find out if the start date is earlier than today. Philip M, I couldn't adopt your code to my existing code. I have no idea how to do it.
Please help

Philip M

06-11-2008, 08:22 PM

Just add the code and call the function

checkdate()

at the appropriate point.

Your code is so long-winded and convoluted that I cannot easily see the best position for it. But you seem to be trying to run before you can walk. If you don't understand Javascript it is not too surprising that you find it hard to implement.

tomws

06-11-2008, 08:45 PM

What I need is adding another check, to find out if the start date is earlier than today.