event DateChanging (HeaderArrow as HeaderArrowEnum, Cancel as Variant)
Occurs when the user is about to change the browsed date.

TypeDescription
HeaderArrow as HeaderArrowEnum A HeaderArrowEnum expression that indicates the arrow being clicked.
Cancel as Variant A Boolean expression that specifies whether the default operation is canceled or not.
Use the DataChanging property event to increase or decrease the browsed date as user clicks the arrows in the header of the calendar. The Date property specifies the browsed date. The DateChanged event notifies your application that the browsed date is changed. By default, the Cancel parameter is False, so the default operation is executed when the user clicks a button in the header of the calendar. The SelDate property indicates the date being selected.

The following VB sample changes the month to prev or next when user clicks the LEFT or RIGHT buttons, instead prev / next Year ( which is by default ).

Private Sub Calendar1_DateChanging(ByVal HeaderArrow As EXCALENDARLibCtl.HeaderArrowEnum, Cancel As Variant)
    Cancel = True
    With Calendar1
        If (HeaderArrow = exPrevYear) Then
            .Date = DateAdd("m", -1, .Date)
        Else
            If (HeaderArrow = exNextYear) Then
                .Date = DateAdd("m", 1, .Date)
            End If
        End If
    End With
End Sub

Previously the ShowMonthSelector property is set on False, so only the LEFT and RIGHT buttons are displayed. By default, the LEFT and RIGHT arrows changes the year, while the UP and DOWN arrows changes the month. The sample hides the UP and DOWN buttons, and let only the LEFT and RIGHT buttons and the code changes the current date to prev or next month. 

Syntax for DateChanging event, /NET version, on:

private void DateChanging(object sender,exontrol.EXCALENDARLib.HeaderArrowEnum HeaderArrow,ref object Cancel)
{
}

Private Sub DateChanging(ByVal sender As System.Object,ByVal HeaderArrow As exontrol.EXCALENDARLib.HeaderArrowEnum,ByRef Cancel As Object) Handles DateChanging
End Sub

Syntax for DateChanging event, /COM version, on:

private void DateChanging(object sender, AxEXCALENDARLib._ICalendarComboEvents_DateChangingEvent e)
{
}

void OnDateChanging(long HeaderArrow,VARIANT FAR* Cancel)
{
}

void __fastcall DateChanging(TObject *Sender,Excalendarlib_tlb::HeaderArrowEnum HeaderArrow,Variant * Cancel)
{
}

procedure DateChanging(ASender: TObject; HeaderArrow : HeaderArrowEnum;var Cancel : OleVariant);
begin
end;

procedure DateChanging(sender: System.Object; e: AxEXCALENDARLib._ICalendarComboEvents_DateChangingEvent);
begin
end;

begin event DateChanging(long HeaderArrow,any Cancel)
end event DateChanging

Private Sub DateChanging(ByVal sender As System.Object, ByVal e As AxEXCALENDARLib._ICalendarComboEvents_DateChangingEvent) Handles DateChanging
End Sub

Private Sub DateChanging(ByVal HeaderArrow As EXCALENDARLibCtl.HeaderArrowEnum,Cancel As Variant)
End Sub

Private Sub DateChanging(ByVal HeaderArrow As Long,Cancel As Variant)
End Sub

LPARAMETERS HeaderArrow,Cancel

PROCEDURE OnDateChanging(oCalendar,HeaderArrow,Cancel)
RETURN

Syntax for DateChanging event, /COM version (others), on:

<SCRIPT EVENT="DateChanging(HeaderArrow,Cancel)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function DateChanging(HeaderArrow,Cancel)
End Function
</SCRIPT>

Procedure OnComDateChanging OLEHeaderArrowEnum llHeaderArrow Variant llCancel
	Forward Send OnComDateChanging llHeaderArrow llCancel
End_Procedure

METHOD OCX_DateChanging(HeaderArrow,Cancel) CLASS MainDialog
RETURN NIL

void onEvent_DateChanging(int _HeaderArrow,COMVariant /*variant*/ _Cancel)
{
}

function DateChanging as v (HeaderArrow as OLE::Exontrol.Calendar.1::HeaderArrowEnum,Cancel as A)
end function

function nativeObject_DateChanging(HeaderArrow,Cancel)
return