Navigation and Gesture in Xamarin.iOS SfCalendar

2 Mar 20221 minute to read

Move to Date

Visible dates can be moved to specific date using MoveToDate property available in SfCalendar. It will move to any specific month,year,decade,century view based on the ViewMode.

  • C#
  • NSCalendar date = NSCalendar.CurrentCalendar;
    NSDate today = new NSDate();
    NSDateComponents movetoDateComponents = date.Components(
            NSCalendarUnit.Year | NSCalendarUnit.Month | NSCalendarUnit.Day, today);
    movetoDateComponents.Year = 2015;
    movetoDateComponents.Month = 4;
    movetoDateComponents.Day = 1;
    NSDate moveToDate = date.DateFromComponents(movetoDateComponents);


    The specified date should lie between MinDate and MaxDate, if the specified date is greater than MaxDate then the view will be moved to MaxDate and if the specified date is lesser than the MinDate then the view will be moved to MinDate.

    Toggle navigation

    This navigation, using touch gesture can be enabled and disabled using NavigationEnable property available in SfCalendar control. By default, NavigationEnable property is enabled.


    By default, SfCalendar views can be moved backwards and forwards using touch swipe gesture.

  • C#
  • calendar.ViewMode = SFCalendarViewMode.SFCalendarViewModeMonth;
    calendar.EnableNavigation = false;