I have a Date Script
var f = this.getField("WeekEndDate");
var d = new Date(f.value);
d.setDate(d.getDate()-6);
event.value = util.printd("mm/dd/yyyy", d);
This works fine, but when the Filed Name "WeekEndDate" is blank you get error messages. I was hoping to adjust the script so that if WeekendDate.length == 0 if would blank out the filed were the script is located and if WeekendDate.length > 0 it would run the above script but I do not know how. Can someone help me please