Created On: 21 October 2011
Problem:
The users would like the date entry control to initially display blank but even when the "SHOW-NONE" style is applied the control displays the current date. What is required to make the date entry control display a blank date?
Resolution:
Assigning the show-none style only affects the value that the control RETURNS when inquired on. If the check box is unchecked then inquiring the value will return zero for a date and all 9s for a time. The control still must display a valid date. Show-none does not affect the value displayed.
The date entry control is actually an implementation of Microsoft's calendar control which must always display a valid date. It cannot display a blank date as blanks are not a valid date. When the date entry control detects a value that is not a valid date then it displays the current date. This behavior cannot be changed.
Note that most GUI applications have this behavior. For example think about when a new meeting is created using Microsoft Outlook, it defaults to the current date. This is the standard behavior for GUI applications and what most users expect.
What some ACUCOBOL-GT programmers have done is assign a defalut value that is outside the range of dates that the user would expect. For example a default date of 1/1/1900 would draw attention and alert the user to input a date.
The date entry control is actually an implementation of Microsoft's calendar control which must always display a valid date. It cannot display a blank date as blanks are not a valid date. When the date entry control detects a value that is not a valid date then it displays the current date. This behavior cannot be changed.
Note that most GUI applications have this behavior. For example think about when a new meeting is created using Microsoft Outlook, it defaults to the current date. This is the standard behavior for GUI applications and what most users expect.
What some ACUCOBOL-GT programmers have done is assign a defalut value that is outside the range of dates that the user would expect. For example a default date of 1/1/1900 would draw attention and alert the user to input a date.
Old KB# 34998