Are you sure that the field "DateField1" is filled in? You should check
that before proceeding with the rest of the code...
Yes, the field is filled in.
I entered the date myself.
I've put a "console.println" function after every var... to output the "var" value in the console
vDate1 and vDate2 gave an output (12122012 and 12122013)
But vDateInput2 gave the error "vDateInput2 is null"
So i don't understand it
That's odd... Could you share the file?
I've send you a private message with a link to the file.
I found the solution myself.
I changed the folowin line
var vDate2 = this.getField("p14 - vraag 3.1 Datum 1").value;In to
var vDate2 = this.getField("p14 - vraag 3.1 Datum 1").valueAsString;
And now it works
Yes, that was it... but there's another issue. See my PM.