Copy link to clipboard
Copied
Hi,
I am trying to fix a little issue with a PDF file we use for contracts. I used a personalized format for the date field (dd mmmm yyyy) but unfortunately it keeps capitalizing the month. These documents are in French, and capitalizing the first letter of the month is a grammatical mistake, so I'd like to change it to be displayed in small caps only but I'm falling short on that one. I know I'll probably need some type of script but I'm not well versed in that area, any help would be appreciated!
Copy link to clipboard
Copied
Fastoche !
util.printd("date(fr){DD MMMM YYYY}", new Date(), true);
Copy link to clipboard
Copied
Hi JR,
Not sure if I'm putting it in the wrong spot, I tried both in validation and calculation (in the properties tab of the date field) and it's not working, does it go somewhere else? Merci 🙂
Copy link to clipboard
Copied
Use this script as a Custom Format Script:
var d = util.scand("dd/mm/yyyy", event.value); //récupère la date saisie
if (d == null) { // si la date n'est pas valide ou ne correspond pas au format dd/mm/yyy
app.alert("Merci de saisir une date au format JJ/MM/AAAA");
event.rc = false;
}
else {event.value = util.printd("date(fr){D MMMM YYYY}", d, true)}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now