Participant
September 6, 2021
Question
Javascript Dates
- September 6, 2021
- 2 replies
- 611 views
I have a timesheet that has a weekending in the header and dates for the times Sun-Sat.
When I change the w/e saturday date then the Sun-Sat dates update with javascript on my desktop PC.
The dates do not update on the Acrobat Reader App on my iphone.
Timesheet attached.
Any ideas?
The javascript was written for me. Here is the javascript for Sun date to update:
//<AcroForm>
//<ACRO_source>Date1.0:Calculate</ACRO_source>
//<ACRO_script>
/*********** belongs to: AcroForm:Date1.0:Calculate ***********/
var s1 = this.getField("MainDate").valueAsString;
if (s1=="") event.value = "";
else {
var d1 = util.scand("dd-mmm-yy", s1);
d1.setDate(d1.getDate()-6);
event.value = util.printd("dd-mmm", d1);
