Hello, I have a text field that I validate with a certain JS function (hour

Hello,
I have a text field that I validate with a certain JS function (hoursValidation()). This function makes multiple validation checks (calls other sub-methods within). One of the sub-functions validates whether the selected date is not more than 2 working days before the current day. I do not know how to correctly call the "calworkdays" function using the FormAPI.evaluateServerSideExpression. Here is part of the code:
...
var earlierdate = new Date(yearfrom,monthfrom-1,datefrom);
var laterdate = new Date(yearto,monthto-1,dateto);
var daysDifference = FormAPI.evaluateServerSideExpression(function(fn) {return fn;},["calworkdays",'earlierdate','laterdate');
if(daysDifference <= 2)
                    {
                              return true;
                    }else{
                              return false;
                    }
Please tell me if you have any suggestions about properly using the "calworkdays" function within the FormAPI.evaluateServerSideExpression. The function expects 2 input parameters (in this case - "earlierdate" and "laterdate"). Than...

OriginalPostID-68197

OriginalPostID-68197

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data