View Single Post
Old 01-02-2013, 07:17 PM   PM User | #3
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,437
Thanks: 52
Thanked 454 Times in 452 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
Have a look at the code posted in this thread:
http://www.codingforums.com/showthread.php?t=285082

basically, the idea is that when the first date is selected the minDate for the second date is set via options.

No need for validation or blocking the form submission - the user just can't pick a date that doesn't make sense.

For extra security, you can make those inputs read-only. The date picker will still work on them, but you won't be able to type values in from the keyboard

oh, yes - and as Andrew points out, the datepicker will only work using the IDs of the inputs - class names are very problematic
xelawho is offline   Reply With Quote
Users who have thanked xelawho for this post:
j4v3d (01-03-2013)