Input Masking and Date Templates
After you enter a date template, you can turn on input masking for the field by setting the InputMasking property to TRUE. OpenROAD then validates your template. If you have entered a template that is inappropriate for a date field or is not a date template that allows input masking, OpenROAD does not let you exit the field until you enter a valid date template.
Enabling input masking for a date field affects what date templates you can use and how the end user can interact with the field when the application is running.
When you want to use input masking on a date field, the template must meet the following requirements:
• The template must be an absolute date or time format template.
• The template cannot include an ordinal number (for example, 1st, 2nd, or 3rd).
Do not include the letters that create the ordinal number
(st, nd, and so forth) in the template.
• To specify the month, use 02, Feb, or Fe.
You cannot use the full name of the month.
• To specify the day, use 03, Sun, or Su.
You cannot use the full name of the day.
• The template cannot include the alignment format item (|).
• There must be adequate room for all the digits required by the format.
The input masking feature requires the end user to enter a specified character in a specified position. Consequently, each format must include specifications for all required positions.
For example, assume that you specify a format representing the month/day/year that looks like this (with no leading blanks or zeros in front of the digits):
2/3/1
If you enable input masking, this format is unacceptable because all the entries can be at least two digits (00/00/00 or 00/00/0000) and the preceding format only allows for the one digit in each part. To specify a format compatible with input masking, use either of the following formats:
2/ 3/ 1
(blanks preceding the digits) for a blank-filled date on output
“02/03/01”
for a zero-filled date on output.
When end users enter data in a date field that has input masking enabled, OpenROAD accepts only numbers in the numeric portions of the template and alphabetic characters in the non-numeric portions (month and day names).