These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Calendar option

johnmolina
Registered: Mar 27 2008
Posts: 76
Answered

I am using the calendar option on several fields. that works fine. However, some users have tried to directly type in the date.

Is there an option so they can only use the calendar and not directly enter date?

thank you.

radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
There is no really solution for this task.

You can try to create 2 date fields.
"DateA" is write protected and uses the script:
Formular1.#subform[0].DateA::calculate - (JavaScript, client)this.rawValue = DateB.rawValue;

and also
Formular1.#subform[0].DateA::enter - (JavaScript, client)xfa.host.setFocus(xfa.resolveNode("Formular1.#subform.DateB"));

The second date field "DateB" is right next to "DateA", but it's width is set to "0.001", so it isn't really visible.

If the user now clicks on "DateA" the focus is automatically set to "DateB", where only the button to open the calendar appears.

Well, this is not a perfect solution, but maybe some help.

Example:

https://share.acrobat.com/adc/document.do?docid=a51eb7c8-531e-4a9a-ae9c-030b211d8bfe

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

jonom
Registered: Jan 31 2008
Posts: 133
johnmolina wrote:
I am using the calendar option on several fields. that works fine. However, some users have tried to directly type in the date.
Using the Display, Edit and Validate patterns you can force users to enter dates in a particular format if they type it in.
eopi
Registered: Dec 14 2009
Posts: 12
jonom wrote:
johnmolina wrote:
I am using the calendar option on several fields. that works fine. However, some users have tried to directly type in the date.
Using the Display, Edit and Validate patterns you can force users to enter dates in a particular format if they type it in.
This is a great fix.

2 thumbs up