I have two fields on a form that are used as a start and end date for a temporary duty which is normally 10 days. I have a script that automatically enters a date into the end date field which is 9 days after the start date field. I would like the user to be able to override and enter a different date if the temporary duty is going to be less than 10 days. Below is the script I entered into the End Date field:
var date= util.scand("dd mmm yy", this.getField("PTDYStart").value;
event.value=util.printd("dd mmm yy",date)
I welcome any and all assistance with this.
Have you considered having a field with the length of the TDY and default that field to 9?
Then the service member could change the number of days for the TDY assignment as needed and you would use the value of the field in the calculation.