Copy link to clipboard
Copied
Hello! I'm encountering an issue when showing a user-selected date in multiple formats. At the beginning of the form, the user can select the date from the calendar dropdown. Later on in the form, I need to display this selected date as dd in one field, mm in another field, and yyyy in the last. For some reason though the custom calculation script I'm using is only working for dates before August 11th, and I'm not sure why it's not allowing me to calculate any other dates. Below is the script I'm using:
var s = this.getField("Date").valueAsString; //"Date" is what I've named the first date field.
if (s=="") event.value = "";
else { var d = util.scand("dd-mm-yyyy", s); d.setDate(d.getDate()-0); event.value = util.printd("dd", d); }
Any ideas of what might be going wrong here? Thanks in advance!
Copy link to clipboard
Copied
What format does you use at the field "Date" ?