Just to make sure - have you included the "Handles" clause?
DayPilotCalendar1_TimeRangeMenuClick(ByVal sender As Object, ByVal e As TimeRangeMenuClickEventArgs) Handles DayPilotCalendar1.TimeRangeMenuClick
You have to either use Handles or specify OnTimeRangeMenuClick attribute in the .aspx declaration.