Skip to main content
Participant
July 17, 2026
Answered

JavaScript help for Dynamic Custom Stamp to make month appear in ALL CAPS

  • July 17, 2026
  • 2 replies
  • 41 views

Hello,

I want to create a Custom Dynamic stamp that uses the current day’s date on the date the stamp is used, and shows the date using a 3-letter month in all caps, then the day, then the year: MMM dd, yyyy. For example, 1/1/2026 should show up as “JAN 01, 2026

From Acrobat Pro DC (Ver 2026.001.21691), Win 11, I did the following:

  1. All tools > Add a stamp > Custom stamps > Create.
  2. In Select Image dialog, selected Browse to choose image > Open > OK
  3. In Create Custom Stamp dialog, selected Dynamic > entered Name for stamp > OK
  4. Navigated to newly created PDF stamp file and opened it: C:\Users\username\AppData\Roaming\Adobe\Acrobat\DC\Stamps > xxxxxxxxxxxxxxx.pdf
  5. With new stamp open, selected All tools > Prepare a form > Create form.
  6. Selected Text field, placed on stamp, switched to Select tool, double-clicked text field.
  7. In Text Field Properties dialog box, selected Calculate > Custom calculation script > Edit.
  8. In JavaScript Editor, I entered the following:
 

var date = new Date();

var months = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"];

var month = months[date.getMonth()];

event.value = (month + " " + date.getDate() + ", " + date.getFullYear()).toUpperCase();

While there are no apparent errors in this script, the date is showing up with only the first letter capitalized.

Instead of  “JAN 1, 2026,” I’m getting “Jan 1, 2026”

I tried using one of the free AI chat bots, Gemini I think, and tried the different variations it generated, but noting worked to get the month to show up in all capital letters.

Is this not possible in Adobe? Is there an embedded field or code not allowing allcaps?

Thanks in advance for any help.

Correct answer try67

Works fine for me. Make sure you set the field’s Format to None, though.

2 replies

try67
Community Expert
Community Expert
July 23, 2026

Note that flattening will affect ALL comments and fields on the specified pages, and that it’s NOT reversible, so make sure you have a backup copy of your file, just in case!

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
July 17, 2026

Works fine for me. Make sure you set the field’s Format to None, though.

Participant
July 17, 2026

Amazing, that worked, thank you.

Another issue that has cropped up is that my custom stamp also has a blank for a signature. After I place the stamp on the document, then try to add a signature using Fill & Sign / E-sign, and dragging the signature to where I want it, I can’t see that part of the signature where the custom stamp is, only if I move it around past the margins of the stamp do I see the signature. Is there any way to have the stamp appear behind any added text/image, or move the signature to the front?

try67
Community Expert
Community Expert
July 18, 2026

Not unless you flatten the page where the stamp is located, which will convert it to static contents.