Date and datetime fields should enable the List lamp. When the user invokes List on these fields, the form opens the Calendar window.
SOP
1. 選擇要設定的Item Property
2. 設定Item Data Type = Date or Datetime
3. List of Values 選擇”Enable_List_Lamp”
Date fields should use the ENABLE_LIST_LAMP LOV
Set '"Validate from List" to No on fields that use this LOV. If you leave "Validate from List" set to Yes, you will see an LOV that has no columns.]
4. New Trigger in this item : KEY_LISTVAL
Each date field within a form needs to have the following code:
[Trigger Content]
Trigger: KEY-LISTVAL:
calendar.show([first_date]);
By default, the Calendar shows the month of the value in the date field (if a value exists) upon first opening. If no specific date is supplied, the Calendar shows the current month.
Do not pass the current field into CALENDAR.SHOW as a parameter, as this forces validation of the field. The current field is used as a default. Generally, the code in KEY-LISTVAL should be:
calendar.show;
5. Preview Result
簡易教學,提供大家參考