Hello @itzikn,
Thank you very much for using our plugin. I’ll try to describe the process with a hypothetical example. Assuming the date fields are fieldname1 and fieldname2, respectively, and their date format is mm/dd/yyyy.
Insert a calculated field in the form and enter the following piece of code as its equation (The calculated field can be hidden by ticking a checkbox in its settings):
(function(){
let first = TODAY(),
last = EOMONTH(TODAY());
first.setDate(1);
getField(fieldname1|n).setVal(GETDATETIMESTRING(first, 'mm/dd/yyyy'));
getField(fieldname2|n).setVal(GETDATETIMESTRING(last, 'mm/dd/yyyy'));
})()
There are other alternatives. For example, the following equation is equivalent to the previous one:
(function(){
let first = MONTH()+'/1/'+YEAR(),
last = MONTH()+'/'+DAY(EOMONTH(TODAY()))+'/'+YEAR();
getField(fieldname1|n).setVal(first);
getField(fieldname2|n).setVal(last);
})()
Best regards.