property Calendar.FirstWeekDay as WeekDayEnum
Specifies the first day of the week.

TypeDescription
WeekDayEnum A WeekDayEnum expression that specifies the first day of the week
By default, the FirstWeekDay property is exSunday. Use the LocFirstWeekDay property to get the locale first day of the week as indicated by current regional settings. The AMPM property indicates the AM, PM time indicators to be shown in the control, separated by space,. The MonthNames property specifies the list of name of the months. The WeekDays property specifies the name of the days in the week.

The following samples set the current view to display the locate date/time as set in the current regional settings.

VBA (MS Access, Excell...)

With Schedule1
	With .Calendar
		.FirstWeekDay = .LocFirstWeekDay
		.MonthNames = .LocMonthNames
		.WeekDays = .LocWeekDays
		.AMPM = .LocAMPM
	End With
End With

VB6

With Schedule1
	With .Calendar
		.FirstWeekDay = .LocFirstWeekDay
		.MonthNames = .LocMonthNames
		.WeekDays = .LocWeekDays
		.AMPM = .LocAMPM
	End With
End With

VB.NET

With Exschedule1
	With .Calendar
		.FirstWeekDay = .LocFirstWeekDay
		.MonthNames = .LocMonthNames
		.WeekDays = .LocWeekDays
		.AMPM = .LocAMPM
	End With
End With

VB.NET for /COM

With AxSchedule1
	With .Calendar
		.FirstWeekDay = .LocFirstWeekDay
		.MonthNames = .LocMonthNames
		.WeekDays = .LocWeekDays
		.AMPM = .LocAMPM
	End With
End With

C++

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

	#import <ExSchedule.dll>
	using namespace EXSCHEDULELib;
*/
EXSCHEDULELib::ISchedulePtr spSchedule1 = GetDlgItem(IDC_SCHEDULE1)->GetControlUnknown();
EXSCHEDULELib::ICalendarPtr var_Calendar = spSchedule1->GetCalendar();
	var_Calendar->PutFirstWeekDay(var_Calendar->GetLocFirstWeekDay());
	var_Calendar->PutMonthNames(var_Calendar->GetLocMonthNames());
	var_Calendar->PutWeekDays(var_Calendar->GetLocWeekDays());
	var_Calendar->PutAMPM(var_Calendar->GetLocAMPM());

C++ Builder

Exschedulelib_tlb::ICalendarPtr var_Calendar = Schedule1->Calendar;
	var_Calendar->FirstWeekDay = var_Calendar->LocFirstWeekDay;
	var_Calendar->MonthNames = var_Calendar->LocMonthNames;
	var_Calendar->WeekDays = var_Calendar->LocWeekDays;
	var_Calendar->AMPM = var_Calendar->LocAMPM;

C#

exontrol.EXSCHEDULELib.Calendar var_Calendar = exschedule1.Calendar;
	var_Calendar.FirstWeekDay = var_Calendar.LocFirstWeekDay;
	var_Calendar.MonthNames = var_Calendar.LocMonthNames;
	var_Calendar.WeekDays = var_Calendar.LocWeekDays;
	var_Calendar.AMPM = var_Calendar.LocAMPM;

JavaScript

<OBJECT classid="clsid:9B09E13D-7A88-4299-9DBE-383380435377" id="Schedule1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
	var var_Calendar = Schedule1.Calendar;
		var_Calendar.FirstWeekDay = var_Calendar.LocFirstWeekDay;
		var_Calendar.MonthNames = var_Calendar.LocMonthNames;
		var_Calendar.WeekDays = var_Calendar.LocWeekDays;
		var_Calendar.AMPM = var_Calendar.LocAMPM;
</SCRIPT>

C# for /COM

EXSCHEDULELib.Calendar var_Calendar = axSchedule1.Calendar;
	var_Calendar.FirstWeekDay = var_Calendar.LocFirstWeekDay;
	var_Calendar.MonthNames = var_Calendar.LocMonthNames;
	var_Calendar.WeekDays = var_Calendar.LocWeekDays;
	var_Calendar.AMPM = var_Calendar.LocAMPM;

X++ (Dynamics Ax 2009)

public void init()
{
	COM com_Calendar;
	anytype var_Calendar;
	;

	super();

	var_Calendar = exschedule1.Calendar(); com_Calendar = var_Calendar;
		com_Calendar.FirstWeekDay(com_Calendar.LocFirstWeekDay());
		com_Calendar.MonthNames(com_Calendar.LocMonthNames());
		com_Calendar.WeekDays(com_Calendar.LocWeekDays());
		com_Calendar.AMPM(com_Calendar.LocAMPM());
}

Delphi 8 (.NET only)

with AxSchedule1 do
begin
	with Calendar do
	begin
		FirstWeekDay := LocFirstWeekDay;
		MonthNames := LocMonthNames;
		WeekDays := LocWeekDays;
		AMPM := LocAMPM;
	end;
end

Delphi (standard)

with Schedule1 do
begin
	with Calendar do
	begin
		FirstWeekDay := LocFirstWeekDay;
		MonthNames := LocMonthNames;
		WeekDays := LocWeekDays;
		AMPM := LocAMPM;
	end;
end

VFP

with thisform.Schedule1
	with .Calendar
		.FirstWeekDay = .LocFirstWeekDay
		.MonthNames = .LocMonthNames
		.WeekDays = .LocWeekDays
		.AMPM = .LocAMPM
	endwith
endwith

dBASE Plus

local oSchedule,var_Calendar

oSchedule = form.Activex1.nativeObject
var_Calendar = oSchedule.Calendar
	var_Calendar.FirstWeekDay = var_Calendar.LocFirstWeekDay
	var_Calendar.MonthNames = var_Calendar.LocMonthNames
	var_Calendar.WeekDays = var_Calendar.LocWeekDays
	var_Calendar.AMPM = var_Calendar.LocAMPM

XBasic (Alpha Five)

Dim oSchedule as P
Dim var_Calendar as P

oSchedule = topparent:CONTROL_ACTIVEX1.activex
var_Calendar = oSchedule.Calendar
	var_Calendar.FirstWeekDay = var_Calendar.LocFirstWeekDay
	var_Calendar.MonthNames = var_Calendar.LocMonthNames
	var_Calendar.WeekDays = var_Calendar.LocWeekDays
	var_Calendar.AMPM = var_Calendar.LocAMPM

Visual Objects

local var_Calendar as ICalendar

var_Calendar := oDCOCX_Exontrol1:Calendar
	var_Calendar:FirstWeekDay := var_Calendar:LocFirstWeekDay
	var_Calendar:MonthNames := var_Calendar:LocMonthNames
	var_Calendar:WeekDays := var_Calendar:LocWeekDays
	var_Calendar:AMPM := var_Calendar:LocAMPM

PowerBuilder

OleObject oSchedule,var_Calendar

oSchedule = ole_1.Object
var_Calendar = oSchedule.Calendar
	var_Calendar.FirstWeekDay = var_Calendar.LocFirstWeekDay
	var_Calendar.MonthNames = var_Calendar.LocMonthNames
	var_Calendar.WeekDays = var_Calendar.LocWeekDays
	var_Calendar.AMPM = var_Calendar.LocAMPM