Hi,
I am trying to calculate the difference between two dates in an HTML5 form. The following code in the XDP template/form works in Designer's PDF preview tab but it does not work in Designer's "Preview HTML' tab and when the form is uploaded in AEM and rendered as HTML form. The field appears blank.
The calculate event with FormCalc Language is used.
Abs(Date2Num(Table1.Row3.DateField2, "YYYY-MM-DD") - Date2Num(Table1.Row2.DateField1, "YYYY-MM-DD"))
I also tried the DateDiff function as JavaScript language and the result was also blank. (Ref: https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-by-category/date-an...)
DateDiff("d", Table1.Row2.DateField2, Table1.Row3.DateField1)
What date functions are supported for HTML forms in AEM 6.5? Is there a sample script that works for HTML forms.
Thanks,
Leena