In this video, I'm going to show you How you can calculate DUE DATE in PDF Form and PDF Document with PDF JavaScript. I'm using Adobe Acrobat Pro DC 2023.
First, we need to create two Javascript for calculating the due dates of a certain number of days and Months. I have shown every single step in the video, just follow as shown.
________________________________________________________________________
If you still facing any problems, Let me know in the comment box down below.
For more videos, Subscribe to our channel: [ Ссылка ]
________________________________________________________________________
How to create a dependent Dropdown menu in adobe acrobat
[ Ссылка ]
Create an auto-calculating PDF INVOICE in adobe acrobat
[ Ссылка ]
How to add checkboxes and run Javascript in Adobe Acrobat
[ Ссылка ]
________________________________________________________________________
JAVASCRIPT:
For Days:
var d = util.scand("dd/mm/yyyy", this.getField("Date").valueAsString);
var theTime = d.getTime () ;
var oneDay = theTime + 5*24*3600*1000;
var dd = new Date(oneDay);
event.value = util.printd("dd mmmm yyyy", dd);
For Months:
var d = util.scand("dd/mm/yyyy", this.getField("Date").valueAsString);
var cMonth = d.getMonth() + d.getFullYear() * 12;
d.setMonth(d.getMonth() + 1);
var diff = d.getMonth() + d.getFullYear() * 12 - cMonth;
if (diff != 1) {
d.setDate(0);
}
event.value = util.printd("dd mmmm yyyy", d);
Ещё видео!