Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Date Field - custom entry

Avatar

Level 1

Hello,

I'm trying to create a date field in LC which can only be selected from the drop down calendar.  I would like to disable keyboard entries both before and after the date selection.  Is anyone able to assist?

Thanks.

2 Replies

Avatar

Level 10

You can check the length of the strings during the change event.

A keystroke always has the length 1 and can be filtered.

Add this sript into the change event of your date field:


xfa.event.change = xfa.event.change.length > 1 ? xfa.event.change : "";


Pasting from the clipboard is still possible, but I don't think anyone ever will enter a date this way.