I have three DateTime controls in a Nintex List Form which I want to perform calculations on.
In short, I have a Purchase date, which when entered, and in conjunction with a Lookup from a Dropdown List control, I want to update the two other DateTimes with.
So, basically, the lookup returned is placed into a calculated value and multiplied by 365 (year values returned from lookup and multiplied to get the number of days to add to a date).
This occurs separately for both the Lifecycle date and Warranty date.
So, the controls: -
- Asset Type (Drop down list. JS Var Name = VarAssetType)
- Days calc - Lifecycle (Calculated Field - Performs a lookup based on the Asset Type value selected to return the lifecycle years and is multiplied by 365. JS Var Name = VarLifeFreq)
- Days calc - Warranty (Calculated Field - Performs a lookup based on the Asset Type value selected to return the warranty years and is multiplied by 365. JS Var Name = VarWarFreq)
- Purchase Date (DateTime. JS Var Name = VarPurchDate)
- Lifecycle Date (DateTime. JS Var Name = VarLifeDate)
- Warranty Date (DateTime. JS Var Name = VarWarDate)
/* -------- Nintex control assigned to change event --------- */
ctlDTP = NWF$("#" + VarPurchDate);
var ctlCbo = NWF$("#" +
var ctlCbw = NWF$("#" + VarWarFreq);
var ctlCas = NWF$("#" +
/* ------ Events ------- */
var cctlclife = NWF$('#' +
// get date from first date picker
var depart =
// update second date picker
The result, at this point is the LifeCycle control displaying 'NaN/NaN/NaN' which I'm very proud of, but ultimately not what I want .
Thanks in advance for any assistance.