I would like to add month to a date. I have got 2 dates in my edit form, the today's date and another date which should be 1 month after the date of the first chosen date. I know how to add days but I cannot find out how to add month.
I have tried that piece of code
Code: Select all
function AddMonthsToDateObject(i, months) {
let 0 = $('#' + i);
let d = nuFORM.removeFormatting(o.val(), o.attr('data-nu-format'));
nuSetDateValue(i ,new Date(d).addMonths(months));
}
Many thanks
Yves