I have a datefield, holddate, that I want to add 6 or 12 weeks to, based on a radiobutton click, and display the new date in another datefield, restartdate.......
the holddate defaults to Date(), unless changed by the user.... formatted "MM-DD-YYYY"
my code looks like:
<event activity="click" name="event__click">
dtToday = this.resolveNode("HoldDate").rawValue;
app.alert(dtToday); displays 2015-06-19
app.alert(intWkDate); this doesn't display..... haven't even tried adding 42 or 84 days yet!!!!! trying to determine the days from epoch so I can add the additional days.
If you change to formcalc, you should be able to see your days from epoch value.
That said, your code would look something like this if you were setting the date value in dfWkDate to the day 42 days after dfHoldDate when the date is selected.
dfWkDate = Num2Date(Date2Num($.formattedValue)+42)
Can't believe that was my issue, I even indicated that I was using formcalcs in my tags....
Thank you very much - didn't want to take this issue into the weekend.....