Support » Plugin: Calculated Fields Form » Current date

  • Resolved selett



    I would like to use the current day in a function.

    For example :
    (function(){if (fieldname11 – “current date” < 730){return cdate(fieldname10+1460);}else{return cdate(fieldname11+730);}})()

    How to do this ?

    Thanks for the help
    Best regards


Viewing 1 replies (of 1 total)
  • Plugin Author codepeople


    Hi Selett,

    This is the solution:

    var d = new Date();
    if (fieldname11 – d.valueOf()/86400000 < 730){
    return cdate(fieldname10+1460);
    return cdate(fieldname11+730);

    Thank you for using the plugin!

Viewing 1 replies (of 1 total)
  • The topic ‘Current date’ is closed to new replies.