Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

require date to be two weeks in advance

Status
Not open for further replies.

rubberhead10

Technical User
Sep 13, 2006
49
US
I need to create a form that when the user selects the date required field it will only allow them to choose a date at least two weeks in the future....thanks
 
I think you need to set up a Java Script validation in the field properties.

Can't help you with that but I guess that someone will be able to in one of the Java forums on TT
 
thanks for you responce I was able to figure it out. I created a date field and and put the following script in the custom calculation script box

var d1 = new Date();
var num = d1.valueOf();
num += 1000 * 60 * 60 * 24 * 14;
var d2 = new Date(num);
event.value =util.printd("mm/dd/yyyy", d2);

worked like a charm it can be modified to calculate out any number of days just by changing the last value in the num line to the number of days you want.....
 
Rubberhead10

I am very new to Adobe and know absolutely nothing about scripts. Any idea for a script that would limit a time frame in a cell? i.e. The date entered in the frame must be within the past 3 months.
 
ok I am sure you can do it with a script but I would not be you man.....I am really bad at scripting. I can take a script and be able to follow it and make some adjustments but from scratch I SUCK........I would probably start a new post at this site. there are some really good people here and they have helped me many times......wish I could help you......sorry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top