I would like to make a PDf log sheet using livecycle designer. What type of function would I use to be able to enter a date in a date field and then have the form automatically fill in the consecutive dates on the rest of the form.
Dates in LiveCycle are handled the same way dates are handled in AcroForms. This is because dates are part of Core JavaScript, not any particular DOM.
The LiveCycle DateTime field sets and returns dates in JavaScript as a string. So your code has to grab this string. Parse it into a real date object. Calculate out the set of consecutive dates. Then reformat these dates into the correct format and apply them to the consecutive date fields.
Here's an article on dates in JavaScript. [url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/date_time_part1/]http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/date_time_part1/[/url]
There are 3 parts. The examples are in AcroForm JavaScript but 90% still applies to what you want to do.
The LiveCycle DateTime field sets and returns dates in JavaScript as a string. So your code has to grab this string. Parse it into a real date object. Calculate out the set of consecutive dates. Then reformat these dates into the correct format and apply them to the consecutive date fields.
Here's an article on dates in JavaScript.
[url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/date_time_part1/]http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/date_time_part1/[/url]
There are 3 parts. The examples are in AcroForm JavaScript but 90% still applies to what you want to do.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script