Drop-down calendar DataWindow option

The drop-down calendar DataWindow option is now available for use on any DataWindow column with an EditMask and a Date, DateTime, or TimeStamp datatype. In DataWindow .NET 1.5, the option was available only for Web DataWindows. The DDCalendar EditMask property option allows for separate selections of the calendar month, year, and date. This option can be set in a check box on the Edit tab of the DataWindow painter Properties view when a column with the EditMask edit style is selected. It can also be set in code, as in this example for the birth_date column:

dw_1.Modify("birth_date.EditMask.DDCalendar='Yes'")

You can specify the format for the date and time in the DataWindow painter or in code:

[Visual Basic]
CType(strtdt.EditStyle, EditMask).Mask = "yyyy-mm-dd"

[C#]
((EditMask)strtdt.EditStyle).Mask = "yyyy-mm-dd";

The range for years in Windows applications is 1753 to 3000. You can set the following properties to control the display of the calendar in a script or on the Other page in the Properties view for the column:

Painter option

Property

Drop Align Right

Column.Editmask.ddcal_alignright

CalendarBackColor

Column.Editmask.ddcal_backcolor

CalendarTextColor

Column.Editmask.ddcal_textcolor

CalendarTitleBackColor

Column.Editmask.ddcal_titlebackcolor

CalendarTitleTextColor

Column.Editmask.ddcal_titletextcolor

CalendarTrailingTextColor

Column.Editmask.ddcal_trailingtextcolor

To make sure that dates selected with the drop-down calendar option are displayed with the desired edit mask for Web DataWindows, you should specify that the Client Formatting option be included with the static JavaScript generated and deployed for the DataWindow. To conserve bandwidth, JavaScript for client formatting is not included by default. To include this script, you can select the Client Formatting check box on the Web Generation page of the DataWindow Properties view. If you do not include script for client formatting, the drop-down calendar uses a default edit mask to display the column data based on the client computer's default localization settings.

To navigate in the drop-down calendar, a user can:

For more information, see the description of EditMask.property in the DataWindow Object Reference or the online Help.