These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Validate future date using a conditional plus current date.

buckynwd
Registered: Jan 6 2011
Posts: 11

Ok this one just hurts my head trying to think about the FormCalc script to write. What I need to do is validate a date/time field using the current date and specific values from a drop-down box. For example, in plain English: If today's date is 1/12/2011 and the drop-down value is "1" then the "start date" must be equal to or greater than two weeks in the future (1/26/2011).
 
To add a whole wrinkle to the problem. I need to add a message box if the following condition is met: If today's date is 1/12/2011 and the drop-down value is "1" and the "start date" is less than two weeks in the future (i.e. 1/25/2011).
 
Also, some of the values in the drop-down box do not require the same validation meaning that any date in "start date" is acceptable.
 
And one more thing, I still want the user to able to submit the form via email (I have a button) even if they put in a date less than two weeks triggering the message box.
 
Am I asking for too much. Or is this doable?

My Product Information:
LiveCycle Designer, Windows
buckynwd
Registered: Jan 6 2011
Posts: 11
OK so far I have

if (OEDCode == "5") then
(Num2Date(Date2Num(TrainingDay, "MMM DD, YYYY" - $, "MMM DD, YYYY") <= (14), "MMM DD, YYYY"))
else
$.rawValue = num2date(date(), DateFmt(2))
endif

Am I on the right track? When I test it, I get validation errors automatically when I open the pdf and when I change the fields in question.

DaveyB
Registered: Dec 10 2010
Posts: 70
This is the exact same question you asked in your topic "date validation question.Please understand that the people that answer questions here are volunteers, and by posting the same question multiple times, you take away the time we could spend answering other people's questions. In addition, this entire forum becomes an answer database where people can search for a previously submitted question and read the answers provided - by double posting a question, you are creating a dead-end for people searching for an answer to their own problem.

I understand that you need an answer to your question, and as soon as someone with experience in the matter finds your question, they will respond. Rest assured, your initial question shows up for everyone as either "new topic" or "new post" in the forum listing. It will be answered as soon as someone is able to do so!

In the meantime, I have already replied in the topic I linked to above. Please read that and reply there if you have any questions!

Thanks!

DaveyB

LiveCycle Designer 8.0
"Genius is one percent inspiration, ninety-nine percent perspiration." ~~ Thomas Edison
"If at first you don't succeed, get a bigger hammer." ~~ Alan Lewis
"If the conventional doesn't work, try the unconventional" ~~ DaveyB