Change Text Color base on date
Hi,
I am working on a PDF in Acrobat Pro DC and need some help with some JS that is eluding me. I am trying to make the text color change based on an expiration date. If the date is today or earlier to change text to red. otherwise black.
Here is what i have at the moment put in the custom calculation script, i have tried many different versions i just cant get it to work. I cant seem to find anything anywhere on line for this.
Any assistance is greatful on where i could be going wrong.
var Date = util.printd("dd-mmm-yyyy", new Date());
if (event.value.date <= Date)
{
event.target.textColor = color.red;
}
else
{
event.target.textColor = color.black;
}