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.