Issue copying date to another field

Explorer ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

Hello,

I have a date-text field. The format is mm.dd.yy

 

On a button click, I want to copy this date to another text field.

I'm using

 

this.getField("newfield").value= this.getField("Data").value;

 

The issue is that on the newfield, the date appears like mm.dd.yyyy

Any idea? Thank you.

TOPICS
PDF forms

Views

108

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

correct answers 1 Correct Answer

Explorer , Apr 23, 2021 Apr 23, 2021
Just found the issue. There was some code on a dropdown list that modifies the format.Sorry for this.Thank you.

Likes

Translate

Translate
Adobe Community Professional ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

In "newfield" is format set to 'none'?

How did you format "Data" field?

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
Explorer ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

Yes, "newfield" format is set to none.

The Data field is 

Select format category: Date > Custom - dd.mm.yy

 

Thanks.

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 ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

Code should work. Do you have any other calculations in your file? Can you share file here?

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
Explorer ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

LATEST

Just found the issue. There was some code on a dropdown list that modifies the format.

Sorry for this.

Thank you.

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