Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Form date language to English

New Here ,
Jun 11, 2021 Jun 11, 2021

Copy link to clipboard

Copied

Hello,

I have Adobe Acrobat Pro DC English version. I created a form with field fomated as a Date with dd-mmm-yyyy. Document language is set to English but date picker is all over the world. Problem is that for date picker it is showing in there local laguage. After the date picker enter date and share the PDF form, field is populated in different laguage for me (Ex: Spanish,Japanese). I want to restrict the date language to English for all.

How can I fix this? Do i need to write any validation script for this ?

Thank you.

TOPICS
JavaScript, PDF forms

Views

719

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 11, 2021 Jun 11, 2021

Copy link to clipboard

Copied

You can't. If you don't want it localized then don't set the month to be textual, only as a number.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 11, 2021 Jun 11, 2021

Copy link to clipboard

Copied

Your salvation may come with the ISO standard: yyyy-mm-dd

 

In any case this comics was made for you  😉

 

iso_8601

 

https://xkcd.com/1179/

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 11, 2021 Jun 11, 2021

Copy link to clipboard

Copied

There's always an XKCD...

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 11, 2021 Jun 11, 2021

Copy link to clipboard

Copied

The secret is that in this case you should not use the Date format, nor any other "format" and use this as a Validation script:

 

// VALIDATION SCRIPT
var d = util.scand("yyyy-mm-dd", event.value);
if (d == null) {
app.alert("Please enter a Date at the yyyy-mm-dd format.");
event.rc = false;
}

 

This script works with any date format, just edit what is orange.



Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 11, 2021 Jun 11, 2021

Copy link to clipboard

Copied

How is that different from using the Date format with that pattern? The issue is they're using "mmm" instead of "mm".

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 11, 2021 Jun 11, 2021

Copy link to clipboard

Copied

Apart the iso date format, you can add an invisible field.
In validation of the date field you type:
if (event.value!="") this.getField("invField").value=util.scand("dd-mmm-yyyy", event.value);
else this.getField("invField").value="";
and you create a document level script:
if (this.getField("invField").value!="") this.getField("theDate").value=util.printd("dd-mmm-yyyy", new Date(this.getField("invField").value));

You can try changing the language of your Acrobat Pro software.
@+

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 12, 2021 Jun 12, 2021

Copy link to clipboard

Copied

"How is that different from using the Date format with that pattern? The issue is they're using "mmm" instead of "mm"."

So he should use:

 

// VALIDATION SCRIPT
var d = util.scand("dd-mmm-yyyy", event.value);
if (d == null) {
app.alert("Please enter a Date at the dd-mmm-yyyy format.");
event.rc = false;
}

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 12, 2021 Jun 12, 2021

Copy link to clipboard

Copied

That doesn't solve the problem that the end-user could still enter the month name in their local language...

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 13, 2021 Jun 13, 2021

Copy link to clipboard

Copied

LATEST

So the OP should loop to my first answer.  🙂

 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines