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

Forcing date format validation

odessa_papa
Registered: Nov 29 2011
Posts: 4

I have a drop-down list and the date field next to it. As soon as entry selected from drop-down list (I use "change" event) I populate the date field "SupervisorDate" with the current date using the following line of code:
 
SupervisorSigContent.SupervisorDate.rawValue = num2date(date(), "MM/DD/YYYY")
 
The "SupervisorDate" date field however has custom validation script defined to verify the date. Also it has the following settings: edit pattern - date{MM/DD/YYYY} and display pattern - date{EEE, MMM D, YYYY} which is done to make it inline with all other date fields in the form.
 
The problem is that after selecting item from the drop down list the date field is successfully populated with the current date in the following format: "MM/DD/YYYY"
but all other date fields display date like "Mon, Feb 5, 2011". I tried to use

SupervisorSigContent.SupervisorDate.rawValue = num2date(date(), "EEE, MMM D, YYYY")
 
but in this case my date validation script fails and returns "false"
 
Please help to understand what I am doing wrong and how to overcome this issue.
Appreciate any help.

My Product Information:
LiveCycle Designer, Windows
odessa_papa
Registered: Nov 29 2011
Posts: 4
To better formulate my question: How after successful validation of "MM/DD/YYYY" format to force the date field to apply display pattern to display date in the format EEE, MMM D, YYYY? Maybe there is a better/correct way of handling such cases that I am not aware of.