I have written document javascript that assigns a date value to a form field. However, when the form loads, the date is listed as today (4/16/2009) in this case. But when I click on the date, the correct value is shown (5/14/2009). When I leave the field, it resets back to 4/16/2009
The value of a form field and what the field displays are two different things. The display is set by the format event script. And the action you are describing is exactly what you would get when a format script is overiding the field value, i.e, when you put the keyboard focus on the field it displays the underlying value of the field, but when you click off it displays the value set by the format script.
Here's an article on format scripts:
http://www.acrobatusers.com/tutorials/2006/formatting_text_fields
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script