#include once "window9.bi"

Function CalEv(ByVal gadget As Integer) As Integer Export
	Static As Byte b,b1
	dim as USTRING sClass = GetClassName_(GadgetID(gadget))
	Select Case sClass
		Case "SysDateTimePick32"
			b+=1
			If b=1 Then
				Return 1
			ElseIf b=6 Then
				b=0
			EndIf
		Case "SysMonthCal32"
			b1+=1
			If b1=1 Then
				Return 1
			ElseIf b1=3 Then
				b1=0
			EndIf
	End Select
	Return 0
End Function
