See the PxPlus manul under Multi_line, or search on calendar:
The Calendar feature may be set up using the HLP= option as follows:
MULTI_LINE ctl_id, @(col,ln,wth,ht)),HLP="[Calendar]parameters$"
The parameter list (parameters$) can consist of any of the following options separated by semi-colons:
CALENDAR=YES | NO
YES turns on the Calendar support. NO turns it off. Default is NO.
CONTENTS=string$
Text or graph appearing on the button. Default is "{!DATE}".
DTE=date$
Date formatting rules. Default is based on the DTE( ). Semi-colon cannot be part of this parameter. (If used, the string following will be ignored.)
Date code should include % percent; however, if not used, input will be parsed based on format provided. If a time formatting string is included, the current time is used.
HEIGHT=num
Height of the button. Default is the height defined for MULTI_LINE.
SHOWBUTTON=YES | NO
YES shows the Calendar button. NO hides it. Default is YES.
WIDTH=num
Width of the button. Default width is equal to the height defined for the MULTI_LINE; i.e. the default size is a square.
The 'Calendar$ property can also be used (with the above parameter list):
ML_Ctl'Calendar$="CALENDAR=YES;DTE=%Y%M%D;Contents={!Stop}Stop;Width=10".
When invoked, the top border of the calendar popup will be aligned with the bottom border of the multi-line input area. If parameters are not specified, the default button contents will be {!DATE} and the width and height of the button equal to the height of the control itself.
The following methods can be used to invoke the calendar:
•When the multi-line input area has focus, press Shift-F2. In this case, CTL=-6 is suppressed.
•Use the mouse or touchpad to click on the calendar button.
The calendar will disappear automatically when:
•A date is selected and placed in the multi-line input area.
•An ESC is pressed.
•The user clicks anywhere outside the button or calendar.
When the button is clicked, no EOM value will be generated, as the button is considered part of the MULTI_LINE directive and is handled internally. When a date is inserted into the multi-line input area, no EOM value will be generated unless OPT="A" has been set and focus is on the MULTI_LINE control.
The calendar popup displays the following features:
•A grid-like format makes it easy to distinguish the days of the month.
•The text and background of the current date, as well as the current selection, are presented in a different color for clear identification.
•Previous/Next month arrow buttons allow the user to browse through the months of the currently selected year.
•To see the entire month at a glance, the last day(s) of the previous month and the first day(s) of the next month are displayed.
When the MULTI_LINE is hidden or disabled, the calendar button should also be hidden or disabled, and Shift-F2 will not display the calendar control.
Example:
The following code sample invokes the Calendar feature using both methods: the HLP= string and the Calendar$ property.
0010 PRINT 'DIALOGUE'(0,0,100,50,"test",OPT="*Z")
0020 PRINT '4D','CS'
0030 LET A=1000
0040 MULTI_LINE A,@(10,10,30,1),HLP="[CALENDAR]CALENDAR=YES"
0050 LET B=1001
0060 MULTI_LINE B,@(10,20,30,1)
0070 LET B'CALENDAR$="CALENDAR=YES;DTE=%Y %Ml %D;Contents=Enter Date;Width=10"
0080 PRINT "A: ",A'CALENDAR$
0090 PRINT "B: ",B'CALENDAR$
0100 OBTAIN (0,SIZ=1)'ME',A$,'MN',; LET C=CTL; LET E$=HTA(EOM); PRINT "CTL=",C," EOM=",E$
0110 IF C=4 THEN ESCAPE
0120 GOTO 0100