Working With MonthCalendar Controls in Desktop Windows Applications

Applies to TestComplete 15.62, last modified on March 19, 2024

TestComplete offers a set of functions to work with standard Win32 controls from your tests, including the MonthCalendar control. To work with Win32 MonthCalendar controls it uses the Win32MonthCalendar object. This object is automatically associated with MonthCalendar controls whose class names are listed in the project’s Object Mapping options. If your tested application uses a custom MonthCalendar control that is inherited from a standard MonthCalendar control, you can associate it with the Win32MonthCalendar object by adding its class name to the Object Mapping list. For more information on this, see Default Project Properties - Object Mapping Options.

You can use properties and methods of the Win32MonthCalendar object to work with MonthCalendar controls. For instance, you can use these properties to set and get the date selected in the MonthCalendar control.

The topics of this section describe how to work with Win32 MonthCalendar controls. To learn about working with Android calendar controls see Working With Android Calendar Controls section.

Note: Though the following topics deal with scripts, you can use the same approaches while testing an application from your keyword tests. For more information, see Keyword Tests Basic Operations.

In This Section

Getting MonthCalendar Date in Desktop Windows Applications

Describes how to get the date selected in the MonthCalendar control.

Setting MonthCalendar Date in Desktop Windows Applications

Describes how to set the date or the date range in the MonthCalendar control.

Selecting Multiple Dates in MonthCalendar Controls in Desktop Windows Applications

Describes how to determine whether the MonthCalendar supports multi-selection of dates.

Getting Maximum Date Range in MonthCalendar Controls in Desktop Windows Applications

Describes how to obtain the maximum number of days in the date range that can be set in the MonthCalendar control.

Getting Minimum and Maximum Allowed MonthCalendar Dates in Desktop Windows Applications

Describes how to obtain the last and the first date the MonthCalendar control can show.

Related Topics of Interest

Working With DateTimePicker Controls in Desktop Windows Applications

Explains how you can simulate actions over DateTimePicker controls with TestComplete.

Simulating User Actions

Explains the approaches used for simulating user actions over applications’ controls.

See Also

Win32 MonthCalendar Support
Object-Specific Tasks
Supported Controls
Default Project Properties - Object Mapping Options

Highlight search results