wMinDate Property (Mobile Controls)

Applies to TestComplete 15.47, last modified on January 20, 2023
This property is available in legacy mobile tests that work with devices connected to the local computer. To learn how to simulate user actions in newer cloud-compatible mobile tests, see the Simulating user actions in tests section.

Description

Returns the minimum date that can be specified in the control.

Declaration

TestObj.wMinDate

Read-Only Property Date/Time
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section

Applies To

The property is applied to the following objects:

View Mode

To view this property in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Property Value

The minimum date that can be selected in the control.

Remarks

The date format depends on the local setting of the machine performing test, not the mobile device.

Example

The following example demonstrates how to obtain the date of the Android device using the wDate, wMinDate and wMaxDate properties:

JavaScript, JScript

function Test()
{
  // Select an Android device
  Mobile.SetCurrent("MyDevice");

  // Obtain the CalendarView object
  var p = Mobile.Device().Process("com.example.myapp");
  var CalendarView = p.RootLayout("").Layout("layoutTop").Layout("layout2").CalendarView("calendarView1");
  
  // Get the possible date values
  var CalendarDate = CalendarView.wDate;
  var CalendarMinDate = CalendarView.wMinDate;
  var CalendarMaxDate = CalendarView.wMaxDate;
  
  // Post dates to the log
  Log.Message(CalendarDate);
  Log.Message(CalendarMinDate);
  Log.Message(CalendarMaxDate);
}

Python

def Test():
  # Select an Android device
  Mobile.SetCurrent("MyDevice")

  # Obtain the CalendarView object
  p = Mobile.Device().Process("com.example.myapp")
  CalendarView = p.RootLayout("").Layout("layoutTop").Layout("layout2").CalendarView("calendarView1") 
  
  # Get the possible date values
  CalendarDate = CalendarView.wDate
  CalendarMinDate = CalendarView.wMinDate
  CalendarMaxDate = CalendarView.wMaxDate
  
  # Post dates to the log
  Log.Message(CalendarDate)
  Log.Message(CalendarMinDate)
  Log.Message(CalendarMaxDate)

VBScript

Sub Test()
  ' Select an Android device
  Call Mobile.SetCurrent("MyDevice")

  ' Obtain the CalendarView object
  Set p = Mobile.Device.Process("com.example.myapp")
  Set CalendarView = p.RootLayout("").Layout("layoutTop").Layout("layout2").CalendarView("calendarView1")
  
  ' Get the possible date values
  CalendarDate = CalendarView.wDate
  CalendarMinDate = CalendarView.wMinDate
  CalendarMaxDate = CalendarView.wMaxDate
  
  ' Post dates to the log
  Log.Message(CalendarDate)
  Log.Message(CalendarMinDate)
  Log.Message(CalendarMaxDate)
End Sub

DelphiScript

procedure Test();
var
  p, CalendarView, CalendarMinDate, CalendarMaxDate, CalendarDate : OleVariant;
begin
  // Select an Android device
  Mobile.SetCurrent('MyDevice');

  // Obtain the CalendarView object
  p := Mobile.Device.Process('com.example.myapp');
  CalendarView := p.RootLayout('').Layout('layoutTop').Layout('layout2').CalendarView('calendarView1');
  
  // Get the possible date values
  CalendarDate := CalendarView.wDate;
  CalendarMinDate := CalendarView.wMinDate;
  CalendarMaxDate := CalendarView.wMaxDate;
  
  // Post dates to the log
  Log.Message(CalendarDate);
  Log.Message(CalendarMinDate);
  Log.Message(CalendarMaxDate);
end;

C++Script, C#Script

function Test()
{
  // Select an Android device
  Mobile["SetCurrent"]("MyDevice");

  // Obtain the CalendarView object
  var p = Mobile["Device"]["Process"]("com.example.myapp");
  var CalendarView = p["RootLayout"]("")["Layout"]("layoutTop")["Layout"]("layout2")["CalendarView"]("calendarView1");
  
  // Get the possible date values
  var CalendarDate = CalendarView["wDate"];
  var CalendarMinDate = CalendarView["wMinDate"];
  var CalendarMaxDate = CalendarView["wMaxDate"];
  
  // Post dates to the log
  Log["Message"](CalendarDate);
  Log["Message"](CalendarMinDate);
  Log["Message"](CalendarMaxDate);
}

See Also

Android CalendarView Support
Checking a Calendar's Date Range
Checking a DatePicker's Date Range
iOS DatePicker Support
wDate Property (Mobile Controls)

Highlight search results