I am experimenting with a pair of date components (the second could be just text).
I want to make the second read only (done) and display a date that adds x days to that date based on a rule, which will be calculated in a query. I'm not experienced in JavaScript and struggling with the syntax.
From the Community I found this code;
{ moment(new Date(), "DD-MM-YYYY").add(7, 'days')}}
When I put that in the Default value it successfully adds 7 days to today's date.
I want to use {{date1.value}} rather than todays date, what should the new code look like, what do I replace?
I am also assuming that when I use the query result I just replace the 7, i.e.
.add(7, 'days')}} ---> .add({{query.value}}, 'days')}}
Thanks in advance.