Skip to main content
Participant
December 11, 2025
Question

Make Date field read only with Javascript

  • December 11, 2025
  • 1 reply
  • 206 views

I need to make the date field read only, I've tried this code this.getField("Datec").readonly = true; but doesn't work. Could I please get any idea?

 

Also I need to copy the date field data into a text field or copy the date field data in another Date field. Any suggestion? 

 

Thank you

1 reply

PDF Automation Station
Community Expert
Community Expert
December 11, 2025

Where did you put the script?  It should work if "Datec" is spelled correctly, including case sensitive.  Are there any errors in the console?  To copy the data you can add the following custom calculation script in the 2nd field:

event.value=this.getField("Datec").value;

Participant
December 12, 2025

Thanks for your answer, I double checked and it was in the place where you said but still does not work.

Datec and Date1 is coreectly spelled.

 

I'm attaching a screenshot for you to review.

PDF Automation Station
Community Expert
Community Expert
December 12, 2025

No it isn't.  The name of the field is Datec_af_date.