Calendar: Navigation

This document describes the options to navigate between dates in TKCalendar and the related notifications.

There are two methods in TKCalendar used to navigate forward/backward in the calendar: navigateForward: and navigateBackward:. These methods are context sensitive and the navigation period is specific to the current view mode (e.g. when using a week view the navigation period will be set to one week):

[_calendarView navigateForward:YES];
calendarView.navigateForward(true)
this.CalendarView.NavigateForward(true);

The calendar will not allow navigating to a date outside of the allowed period, specified by the minDate and maxDate properties:

self.calendarView.minDate = minDate;
self.calendarView.maxDate = maxDate;
self.calendarView.minDate = minDate!
self.calendarView.maxDate = maxDate!
this.CalendarView.MinDate = minDate;
this.CalendarView.MaxDate = maxDate;

The navigateToDate:animated: method is used to navigate to specific date within the allowed period:

[self.calendarView navigateToDate:newDate animated:NO];
calendarView.navigate(to: newDate!, animated: false)
calendarView.NavigateToDate (newDate, true);

You can determine whether a navigation occurred by implementing TKCalendarDelegate protocol.

You should implement the calendar:willNavigateToDate: method if you want to be notified before this action occurs and calendar:didNavigateToDate: method when action occured.