Skip to main content
Participant
Dec 11, 2025 8:29 PM UTC
Question

Make Date field read only with Javascript

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

4 replies

PDF Automation Station
Community Expert
Community Expert
Dec 11, 2025 9:20 PM UTC

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;

Translate
Participant
Dec 12, 2025 6:37 AM UTC

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.

Translate
PDF Automation Station
Community Expert
Community Expert
Dec 12, 2025 11:46 AM UTC

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

Translate