By Mike Saunders on December 17, 2007 : Uploaded files: 2
December 17, 2007
Datepicker is an IB program using the Comet direct windows method to display a dialog that allow selection of a date. Datepicker is implemented by setting parameters via #buffer, entering the program and obtaining the results from #buffer.
A Testbed CED program (DTLoader) is included to show implementation of the DatePicker dialog.
Datepicker makes use of the following variables that are passed to it via a #Buffer Print.
10 SETDTPDATE$ = MYDATE$ ! Initial Date for Calendar
3.0 SETDTPROW = DatepromptRow ! Popup position
3.0 SETDTPCOL = DateFieldCol ! Popup position
1.0 FLAG.NOWEEKNUMBERS = 0 ! 0 = NO WEEK NUMBERS
1.0 FLAG.NOTODAY = 1 ! 1 = HAVE TODAY LINE
1.0 FLAG.NOTODAYCIRCLE = 0 ! 0 = NO TODAY CIRCLE
1.0 FLAG.NOSPECIALDATES = 0 ! 0 = NO Force TURN ON SPECIAL DATES.
24 SetPrompt$ = "Select Birthday Date:" ! Prompt for dialog
Upon Pressing Okay or Cancel, Input from # BUFFER will have the returned date.
1) Initial Date can be eight(8) characters (MM/DD/YY) or
2) Initial Date can be ten(10) characters (MM/DD/CCYY)
3) The Date Returned format will match the input format.
4) If Initial Date is not supplied then Initial Date will be todays date(MM/DD/CCYY).
5) While SETDTPROW and SETDTPCOL, set the requested placement of the Popup window, the popup window will make sure it stays visible on the screen.
6) FLAG.NOWEEKNUMBERS controls the display of week number column in the calendar control.
7) FLAG.NOTODAY controls the display of the "Today" line in the calendar control.
8) FLAG.NOTODAYCIRCLE controls the display of the circle around the current day.
9) FLAG.NOSPECIALDATE controls the "forced" display of the ASAP (00/00/00) and TBA (99/99/99) special Date line.
10) If the Initial Date is either of the Special Dates, the Special Date line will display regardless of the flag setting.
11) SetPrompt$ controls the display of a prompt line at the top of the popup. (max 24 characters)
11) If an Invalid Initial Date is supplied, the dialog will not be displayed and the invalid date will be returned. (It is assumend that the original date is doing date verification).
12) If the cancel button is pressed, then the original initial date setting will be returned.
A lot of thanks to Brian for helping on this.
2 files were included in this post: