Default value does not match the format field (Date) specified

New Here ,
Sep 24, 2018

Copy link to clipboard

Copied

I have a field where I would like people to enter their payment card expiry date.

I've set the format of the field as a date, formatted mm/yy

I am trying to have the default value of the field as 'mm/yy' so users can type the correct format instead of finding the date in the calendar.

My problem is that I am getting the error saying that the default value does not match.

Can anyone help me with this?

TOPICS
Acrobat SDK and JavaScript, Windows

Views

170

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

Default value does not match the format field (Date) specified

New Here ,
Sep 24, 2018

Copy link to clipboard

Copied

I have a field where I would like people to enter their payment card expiry date.

I've set the format of the field as a date, formatted mm/yy

I am trying to have the default value of the field as 'mm/yy' so users can type the correct format instead of finding the date in the calendar.

My problem is that I am getting the error saying that the default value does not match.

Can anyone help me with this?

TOPICS
Acrobat SDK and JavaScript, Windows

Views

171

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
Sep 24, 2018 0
Most Valuable Participant ,
Sep 24, 2018

Copy link to clipboard

Copied

You can't use the built-in date Format if you want to do that, you'll need to write your own custom format, keystroke and validation scripts.

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...
Sep 24, 2018 0
New Here ,
Sep 24, 2018

Copy link to clipboard

Copied

Any idea how I can go about doing this?

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...
Sep 24, 2018 0
Most Valuable Participant ,
Sep 24, 2018

Copy link to clipboard

Copied

Start by searching the forums. I believe this issue was discussed several times and you might be able to find some code for it, but it's not a simple task, especially if you don't have any previous experience with Acrobat JS.

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...
Sep 24, 2018 0
Adobe Community Professional ,
Sep 24, 2018

Copy link to clipboard

Copied

I have no problem with Acrobat DC 2018.011.20063. I created a text field and set the format type to "Date" and selected the "mm/yy" format. No problems using the pop-up calendar or manually entering the values.

Do you have any other calculations or actions in the form?

It is possible that that error could be form another 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
Reply
Loading...
Sep 24, 2018 0
New Here ,
Sep 24, 2018

Copy link to clipboard

Copied

That's not my problem, I can also select from the calendar and manually enter a date. I want to set the default value of the field to 'mm/yy' instead of leaving it blank. It won't let me do this, I think because the format set as 'Date' is set for numbers only and i want the default value to be something else, so i'm trying to find a way around this

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...
Sep 24, 2018 0
Adobe Community Professional ,
Sep 24, 2018

Copy link to clipboard

Copied

I have no problem like that. If I reset the form there is no error message.

Can you post a link to a s PDF form with this problem?

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...
Sep 24, 2018 0
try67 LATEST
Most Valuable Participant ,
Sep 24, 2018

Copy link to clipboard

Copied

You don't follow, I think. They want the literal string "mm/dd" to be the field's default value (to let the user know what they need to enter into it)...

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...
Sep 24, 2018 1