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

JavaScript for dates

pappyjack
Registered: Jul 8 2010
Posts: 7

I am creating a form that I need date ranges to appear once the first date is input.

It will be a 2 week range, say, starting from 1/1/10. I want the automatic fill for 1/14/10. Can this be done? Obviously, I am a novice at JavaScript. Any help you can give me would be greatly appreciated.

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
See [url=http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=21539]Calculating Date, Date1....[/url] for a script to generate the series.

More information can be found in [url=http://www.acrobatusers.com/tutorials/2006/date_time_part1]Working with date and time in Acrobat JavaScript (Part 1 of 3)[/url] by Thom Parker. There are also other material within the Learning Center on this site for creating forms and JavaSccripts.

George Kaiser

pappyjack
Registered: Jul 8 2010
Posts: 7
I am editing in Acrobat 9 pro extended. I right click on a field and go to properties. There is a calculation tab and a custom calculation field. Is there a custom script to write in here to add each day?

Day 1 I will enter, day 2 and so on needs to fill in each day.

I am diabetic and trying to make a blood sugar log.
try67
Expert
Registered: Oct 30 2008
Posts: 2399
Did you read the tutorial linked to by gkaiseril?

Edit: By the way, I think Excel is a much better alternative for this kind of calculations. You should consider using it instead of Acrobat.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com