For creating your date object from the 3 drop downs, try this.... New Date(year, month, day, hours, minutes, seconds, ms)
Use the drop down values for year/month/day and zeros for the others, should give you a date object for your users selection. Simply calling 'New Date()' should create another date object with the current date and time. Date() objects are in ms since epoch (Jan 1 1970 ?) I believe, so make sure the 1st date object is one week of milliseconds greater than the current date. Any help?? -----Original Message----- From: Jeff [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 17:06 To: CF-Talk Subject: OT: Javascript Date Validation? Anyone know how to approach this? Okay, I know I know, this is off topic, but I've been banging my head about this one, and I'm SURE it's probably stupid simple, but I'm just not good with dates (insert nerd joke here). Here's a simple form. Three select dropdowns. There's other validation going on, and other stuff happening, but I just snipped it all and kept the relevant portion to focus on. Now, here's what I need it to do. When a user selects a date, I just need to check (onChange, for each select) to make sure that the date they selected is AT LEAST 7 days in advance. So let's say I choose tomorrow and submit...I want an alert that says, "you need to choose a date that's at least 7 days in advance". I think the problem I'm running into is somehow how to concatenate the three date selects into a "date" object, then compare it to "now", but for some reason I'm just totally brain farting how to accomplish this. Once again, I'm sorry for the off-topic-ness of this post, but I don't really have any good javascript recources that have as good a feedback as this one... Here's the snippet of form: <FORM ACTION="action.cfm" METHOD="POST" name="Step1"> <SELECT name="FirstSelectMonth"> <OPTION value="01">Jan <OPTION value="02">Feb <OPTION value="03">Mar <OPTION value="04">Apr <OPTION value="05">May <OPTION value="06">Jun <OPTION value="07">Jul <OPTION value="08">Aug <OPTION value="09">Sep <OPTION value="10">Oct <OPTION value="11">Nov <OPTION value="12">Dec </SELECT> <SELECT name="FirstSelectDay"> <OPTION value="1">1 <OPTION value="2">2 <OPTION value="3">3 <OPTION value="4">4 <OPTION value="5">5 <OPTION value="6">6 <OPTION value="7">7 <OPTION value="8">8 <OPTION value="9">9 <OPTION value="10">10 <OPTION value="11">11 <OPTION value="12">12 <OPTION value="13">13 <OPTION value="14">14 <OPTION value="15">15 <OPTION value="16">16 <OPTION value="17">17 <OPTION value="18">18 <OPTION value="19">19 <OPTION value="20">20 <OPTION value="21">21 <OPTION value="22">22 <OPTION value="23">23 <OPTION value="24">24 <OPTION value="25">25 <OPTION value="26">26 <OPTION value="27">27 <OPTION value="28">28 <OPTION value="29">29 <OPTION value="30">30 <OPTION value="31">31 </SELECT> <SELECT name="FirstSelectYear"> <OPTION value="2003">2003 <OPTION value="2004">2004 <OPTION value="2005">2005 <OPTION value="2006">2006 </SELECT> <INPUT type="submit" value="Submit"> </FORM> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm

