How to add text to a date field

Community Beginner ,
Oct 05, 2018

Copy link to clipboard

Copied

I have a mandatory date field on a form, however I also want the user to be able to custom type text as well (e.g. "Unknown"). I still want the drop-down date picker to be available and it to be formatted as mmm d, yyyy. Is there a way to remove the date validation from just this one field, or is there a script that can be added that makes adding text optional?

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

You can't have it both ways. Either it's a Date field, in which case the date picker will appear when you click in it, but you could only enter a value in the correct format, or it's not, and you could enter whatever you wanted into it (maybe limited by a custom keystroke or validation script).

TOPICS
Acrobat SDK and JavaScript

Views

103

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

How to add text to a date field

Community Beginner ,
Oct 05, 2018

Copy link to clipboard

Copied

I have a mandatory date field on a form, however I also want the user to be able to custom type text as well (e.g. "Unknown"). I still want the drop-down date picker to be available and it to be formatted as mmm d, yyyy. Is there a way to remove the date validation from just this one field, or is there a script that can be added that makes adding text optional?

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

You can't have it both ways. Either it's a Date field, in which case the date picker will appear when you click in it, but you could only enter a value in the correct format, or it's not, and you could enter whatever you wanted into it (maybe limited by a custom keystroke or validation script).

TOPICS
Acrobat SDK and JavaScript

Views

104

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
Oct 05, 2018 0
Most Valuable Participant ,
Oct 05, 2018

Copy link to clipboard

Copied

You can't have it both ways. Either it's a Date field, in which case the date picker will appear when you click in it, but you could only enter a value in the correct format, or it's not, and you could enter whatever you wanted into it (maybe limited by a custom keystroke or validation script).

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
Reply
Loading...
Oct 05, 2018 0
Community Beginner ,
Oct 05, 2018

Copy link to clipboard

Copied

Thanks for your reply. We have a previous version of the form that was created in LiveCycle from years ago that has a drop-down date picker, date formatted mmm d, yyyy and is able to have custom text entered. So it is possible, but perhaps just not with Adobe Acrobat? I prefer Acrobat and don't really want to use LiveCycle if there's a work-around.

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
Reply
Loading...
Oct 05, 2018 1
try67 LATEST
Most Valuable Participant ,
Oct 05, 2018

Copy link to clipboard

Copied

I can't say about LCD forms, but it's not possible with Acrobat forms

(maybe unless you use a third-party date picker, but that has its own set

of problems).

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
Reply
Loading...
Oct 05, 2018 1