cObject
---cWebObject
------cWebBaseUIObject
---------cWebBaseDEOServer
------------cWebBaseControl
---------------cWebBaseDEO
------------------cWebBaseForm
---------------------cWebForm
------------------------cWebDateForm
---------------------------cWebColumnDate
The cWebDateForm class is a web single line edit control with integrated date selection via a popup calendar.
The cWebDatePicker class is a (non-popup) calendar control allowing year, month and date selection.
A date form is ideal for data entry of date values (peDataType = typeDate). It has the appearance of a regular form control with a special prompt button. When the prompt button is clicked a date picker appears allowing the selection of a single date from a monthly calendar.
The form:
The popup calendar:
Other than the integrated popup calendar, a cWebDateForm behaves like a cWebForm. See cWebForm for more information.
Object oCustomerView is a cWebView Object oCustomer_DD is a Customer_DataDictionary End_Object Set Main_DD to oCustomer_DD Set Server to oCustomer_DD Object oCustomer_Name is a cWebDateForm Entry_Item Order.Order_Date Set psLabel to "Order Date:" End_Object End_Object
The above sample demonstrates a cWebView with a data dictionary object (DDO) and a cWebDateForm object with a data binding to the Order table, Order_Date column.
Object oStartDate is a cWebDateForm Set piColumnSpan to 3 Set psLabel to "Start Date:" Set pbServerOnChange to True Procedure OnChange String sNewValue String sOldValue Forward Send OnChange sNewValue sOldValue Send ShowInfoBox to ghoWebApp ("The Date Is: " + sNewValue) End_Procedure End_Object
The above sample demonstrates a cWebDateForm object without a data binding. Whenever the user selects a new date, the OnChange event is fired and the date value is displayed in an Info Box. Note that pbServerOnChange is set to true to ensure that the OnChange event is sent to the server.
Set pbAutoShow to true to automatically activate the date picker whenever the control receives the focus.
Set pbShowToday to determine whether the default date will be today's date according to the client's current system date (i.e. the current date on the client machine).
Set pbShowWeekNr and piStartWeekAt to modify the popup calendar appearance.
This control can be used as a valid drop target by registering it as such in a cWebDragDropHelper object.
The supported actions for this control are:
- C_WebDropOnControl
This allows the control to accept data dragged from elsewhere in the control (if configured that way) and can also be used to accept files when registered within a cWebDragDropFileHelper.