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

Date tutorial Calendar

gwiz
Registered: Jun 9 2007
Posts: 5

Hi Experts,
I've been taking apart DatesExample2_extra.pdf from "Working with date and time in Acrobat JavaScript" and have run into an issue with SetupK(). From my JavaScript Debugger console I get 'ReferenceError: SetupK is not defined.' When I enter the function into Document Javascripts, it doesn't seem to like it and doesn't retain the script. I only want the pop-up calendar so I have copied the following functions to my calendar: ClearCalendar(), FindMonth(), PlaceCalendar(), SetCurrentDate(), SetDays(), SetupCalendar(), and SetupK(). Am I missing anything? I have omitted the '()' from my function names, I don't suspect this to be a problem.
 
Thank you in advance.

My Product Information:
Acrobat Pro 8, Macintosh
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
If you mean the "()" in the Document script names then no, you don't need them. The names of the Document Scripts are arbitrary and not really used. It looks like you've grabbed all relevant the necessary Document Scripts. You also need to copy all the form fields used by the calendar display.

When Acrobat conplains about a function not being defined it usually means one of two thing. First that the call to the function is outside the scope of the where the function is defined, or that there was an error somewhere in the functions code, so it was never defined in the first place.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script