Can I use event.change and event.changEx with date pickers?
I have a date field in my PDF that is using a custom calculated script to get the date value from another date field.
I want to be able to have the option to manually change the date in that field using its own date picker.
The problem I have is that my current script partially works but it looses the focus and reverts to the custom calculated value when I continue to work with other fields.
This is the script that I 'm using:
//event.target is the current date field I want to execute this script
var a = event.target;
if (getField("myOtherDateField") !="") {
var s = a.value = this.getField("myOtherDateField").value;
var d = util.scand("mmmm, d yyyy", s);
d.setDate(d.getDate()+0);
event.value = util.printd("mmmm, d yyyy", d);
} else {
if (a.value = event.changeEx) {
a.value = event.change;
}
}
In the code above I know there is a lot wrong. I understand that event.change and changeEx is normally used with dropdown menus and text fields.
Is there a way to achieve this with date pickers?
It seems like it can work out, but like I indicated it looses the focus and reverts to the calculated value if I click and hit enter on any other field.
I would like to give my users the ability to manually change the date in that field after it has been populated with the value of the other date field.
Thank you in advance.

