View Full Version : Jason's calendar - check one day is after another

06-16-2007, 09:44 AM
1) Script Title: Jasons Date input calendar

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex7/jasoncalendar.htm

3) Describe problem: The calendars work fine for both outward and return journeys on my booking form - using dd-mm-yyyy format.

Is there a snippet of Javscript I can use in my form validation javascript to check that 'Retdate'
<script type="text/javascript">DateInput('Retdate', true)</script>
is after
<script type="text/javascript">DateInput('Outdate', true)

07-01-2007, 04:07 PM
I've been plugging away at this, trying to learn about how to create a date object which will relate to the script and handle the problem. I have also had a look at an airline booking form javascript to see if I can learn from that. But I have had no success.

I really would appreciate a hand with this. It must be a fairly standard booking form requirement, so cracking this one should benefit many.

Strictly, what I am after is the return date being on or after the outbound date.