Navigation and Gesture
26 Jun 2019 / 1 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
.
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);
calendar.MoveToDate(moveToDate);
NOTE
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.
NOTE
By default,
SfCalendar
views can be moved backwards and forwards using touch swipe gesture.
calendar.ViewMode = SFCalendarViewMode.SFCalendarViewModeMonth;
calendar.EnableNavigation = false;
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page