property FaceCalendar.SelDate as Date
Selects the giving date.

TypeDescription
Date A DATE expression that indicates the selected date.
The SelDate / Value property indicates the date that the calendar displays. The FaceCalendarSelectionChanged / FaceCalendarValueChanged event notifies your application once the user changes the selected date in the calendar control. The difference between SelDate and Value is the type which one is of DATE type, while the Value is of Variant type. For instance, you can have Value = "Jan 21, 2012". The UnselectDate property unselects the date in the calendar control.

How do I programmatically selects a date?

VBA (MS Access, Excell...)

With TreeCube1
	With .FrontFace.CreateCalendar
		.Date = #1/1/2001#
		.SelDate = .Date
	End With
End With

VB6

With TreeCube1
	With .FrontFace.CreateCalendar
		.Date = #1/1/2001#
		.SelDate = .Date
	End With
End With

VB.NET

With Extreecube1
	With .FrontFace.CreateCalendar()
		.Date = #1/1/2001#
		.SelDate = .Date
	End With
End With

VB.NET for /COM

With AxTreeCube1
	With .FrontFace.CreateCalendar()
		.Date = #1/1/2001#
		.SelDate = .Date
	End With
End With

C++

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXTREECUBELib' for the library: 'ExTreeCube 1.0 Control Library'

	#import <ExTreeCube.dll>
	using namespace EXTREECUBELib;
*/
EXTREECUBELib::ITreeCubePtr spTreeCube1 = GetDlgItem(IDC_TREECUBE1)->GetControlUnknown();
EXTREECUBELib::IFaceCalendarPtr var_FaceCalendar = spTreeCube1->GetFrontFace()->CreateCalendar();
	var_FaceCalendar->PutDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_FaceCalendar->PutSelDate(var_FaceCalendar->GetDate());

C++ Builder

Extreecubelib_tlb::IFaceCalendarPtr var_FaceCalendar = TreeCube1->FrontFace->CreateCalendar();
	var_FaceCalendar->Date = TDateTime(2001,1,1).operator double();
	var_FaceCalendar->SelDate = var_FaceCalendar->Date;

C#

exontrol.EXTREECUBELib.FaceCalendar var_FaceCalendar = extreecube1.FrontFace.CreateCalendar();
	var_FaceCalendar.Date = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"));
	var_FaceCalendar.SelDate = var_FaceCalendar.Date;

JScript/JavaScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:13A5B44B-DBB7-42F2-AE2B-943A6CF6C8B9" id="TreeCube1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	var var_FaceCalendar = TreeCube1.FrontFace.CreateCalendar();
		var_FaceCalendar.Date = "1/1/2001";
		var_FaceCalendar.SelDate = var_FaceCalendar.Date;
}
</SCRIPT>
</BODY>

VBScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:13A5B44B-DBB7-42F2-AE2B-943A6CF6C8B9" id="TreeCube1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With TreeCube1
		With .FrontFace.CreateCalendar
			.Date = #1/1/2001#
			.SelDate = .Date
		End With
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

EXTREECUBELib.FaceCalendar var_FaceCalendar = axTreeCube1.FrontFace.CreateCalendar();
	var_FaceCalendar.Date = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"));
	var_FaceCalendar.SelDate = var_FaceCalendar.Date;

X++ (Dynamics Ax 2009)

public void init()
{
	COM com_FaceCalendar;
	anytype var_FaceCalendar;
	;

	super();

	var_FaceCalendar = extreecube1.FrontFace().CreateCalendar(); com_FaceCalendar = var_FaceCalendar;
		com_FaceCalendar.Date(str2Date("1/1/2001",213));
		com_FaceCalendar.SelDate(com_FaceCalendar.Date());
}

Delphi 8 (.NET only)

with AxTreeCube1 do
begin
	with FrontFace.CreateCalendar() do
	begin
		Date := '1/1/2001';
		SelDate := Date;
	end;
end

Delphi (standard)

with TreeCube1 do
begin
	with FrontFace.CreateCalendar() do
	begin
		Date := '1/1/2001';
		SelDate := Date;
	end;
end

VFP

with thisform.TreeCube1
	with .FrontFace.CreateCalendar
		.Date = {^2001-1-1}
		.SelDate = .Date
	endwith
endwith

dBASE Plus

local oTreeCube,var_FaceCalendar

oTreeCube = form.EXTREECUBEACTIVEXCONTROL1.nativeObject
var_FaceCalendar = oTreeCube.FrontFace.CreateCalendar()
	var_FaceCalendar.Date = "01/01/2001"
	var_FaceCalendar.SelDate = var_FaceCalendar.Date

XBasic (Alpha Five)

Dim oTreeCube as P
Dim var_FaceCalendar as P

oTreeCube = topparent:CONTROL_ACTIVEX1.activex
var_FaceCalendar = oTreeCube.FrontFace.CreateCalendar()
	var_FaceCalendar.Date = {01/01/2001}
	var_FaceCalendar.SelDate = var_FaceCalendar.Date

Visual Objects

local var_FaceCalendar as IFaceCalendar

var_FaceCalendar := oDCOCX_Exontrol1:FrontFace:CreateCalendar()
	var_FaceCalendar:Date := SToD("20010101")
	var_FaceCalendar:SelDate := var_FaceCalendar:Date

PowerBuilder

OleObject oTreeCube,var_FaceCalendar

oTreeCube = ole_1.Object
var_FaceCalendar = oTreeCube.FrontFace.CreateCalendar()
	var_FaceCalendar.Date = 2001-01-01
	var_FaceCalendar.SelDate = var_FaceCalendar.Date

Visual DataFlex

Procedure OnCreate
	Forward Send OnCreate
	Variant voFace
	Get ComFrontFace to voFace
	Handle hoFace
	Get Create (RefClass(cComFace)) to hoFace
	Set pvComObject of hoFace to voFace
		Variant voFaceCalendar
		Get ComCreateCalendar of hoFace to voFaceCalendar
		Handle hoFaceCalendar
		Get Create (RefClass(cComFaceCalendar)) to hoFaceCalendar
		Set pvComObject of hoFaceCalendar to voFaceCalendar
			Set ComDate of hoFaceCalendar to "1/1/2001"
			Set ComSelDate of hoFaceCalendar to (ComDate(hoFaceCalendar))
		Send Destroy to hoFaceCalendar
	Send Destroy to hoFace
End_Procedure

XBase++

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oFaceCalendar
	LOCAL oTreeCube

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTreeCube := XbpActiveXControl():new( oForm:drawingArea )
	oTreeCube:CLSID  := "Exontrol.TreeCube.1" /*{13A5B44B-DBB7-42F2-AE2B-943A6CF6C8B9}*/
	oTreeCube:create(,, {10,60},{610,370} )

		oFaceCalendar := oTreeCube:FrontFace():CreateCalendar()
			oFaceCalendar:Date := "01/01/2001"
			oFaceCalendar:SelDate := oFaceCalendar:Date()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN