Skip to content

Navigation

Marvin E edited this page Feb 25, 2022 · 29 revisions

From UI

Navigation can be performed on the Calendar by tapping on the backwards and forwards arrows at the top.

From Code

Navigation can be performed by executing the NavigateCalendarCommand which calls the NavigateCalendar method internally.
Navigation can also be performed by changing the NavigatedDate property.

Navigation Options

Navigation Amount

You can change the time unit the calendar navigates in by changing the NavigationTimeUnit property.
You can change the amount the forwards and backwards arrows navigate by by changing the BackwardsNavigationAmount and ForwardsNavigationAmount properties.
For example:

  • NavigationTimeUnit.Day + a NavigationAmount of 15 will move the calendar 15 days forward.
  • NavigationTimeUnit.Day + a NavigationAmount of -15 will move the calendar 15 days backward.
  • NavigationTimeUnit.Month + a NavigationAmount of 3 will move the calendar 3 months forward.
  • NavigationTimeUnit.Year + a NavigationAmount of -8 will move the calendar 8 years backward.

Limiting

Navigation can be limited to a specific range of dates by setting ClampNavigationToDayRange to true and changing the DayRangeMinimumDate and DayRangeMaximumDate properties.

Looping

You can specify the behaviour of the Calendar when trying to navigate outside the bounds of the day range by changing the NavigationLoopMode property.

Properties

Property Type Description
NavigatedDate DateTime The date the calendar is currently navigated to.
TodayDate DateTime The date the calendar will treat as 'Today'.
NavigateCalendarCommand ICommand
(Readonly Property)
The command used to navigate the calendar.
Calls NavigateCalendar internally which takes a parameter of type int indicating how many of the NavigationTimeUnit to navigate by.
NavigationTimeUnit NavigationTimeUnit The time unit the NavigatedDate will change by when navigating.

Day Navigate by a day.
Week Navigate by a week.
Month Navigate by a month.
Year Navigate by a year.
ForwardsNavigationAmount int The number of NavigationTimeUnit to navigate by when navigating forwards.
BackwardsNavigationAmount int The number of NavigationTimeUnit to navigate by when navigating backwards.
DayRangeMinimumDate DateTime The inclusive lower bound of the 'Day Range'.
DayRangeMaximumDate DateTime The inclusive upper bound of the 'Day Range'.
ClampNavigationToDayRange bool Determines whether to treat DayRangeMinimumDate and DayRangeMaximumDate as the bounds for navigation as opposed to DateTime.MinValue and DateTime.MaxValue.
NavigationLoopMode NavigationLoopMode The behaviour of the calendar when navigating outside the allowed range.

DontLoop Don't loop.
LoopMinimum Loop to the upper bound when navigating past the lower bound.
LoopMaximum Loop to the lower bound when navigating past the upper bound.
LoopMiniumAndMaximum Loop as defined in both LoopMinimum and LoopMaximum.