You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/calendar/navigation.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ position: 2
10
10
11
11
# Calendar Navigation
12
12
13
-
The user can navigate through several different views in a calendar - from a century, to a month. You can control in which view the user starts, the date which the calendar shows initially, and how deep the user can go.
13
+
The user can navigate through several different views in a calendar - from a century, to a month. You can control in which view the user starts, the date which the calendar shows initially, how deep the user can go, and to also navigate to a desired date and view with code.
14
14
15
15
The calendar shows arrows that let the user flip between the adjacent periods. Clicking the `Today` button at the top navigates to a period in the current view that includes the current date.
16
16
@@ -84,6 +84,33 @@ The selected date is: @selectedDate
84
84
85
85

86
86
87
+
## Programmatic Navigation
88
+
89
+
You can make the Calendar component move to a certain date and view through its `Navigate` method from your own code. The method takes into account the min and max dates, and the allowed views. If the parameters passed to the method are not allowed by those constraints, navigation will not occur.
90
+
91
+
>caption Navigate the Calendar to a date and view programmatically
92
+
93
+
````CSHTML
94
+
@using Telerik.Blazor.Components.Calendar
95
+
@using Telerik.Blazor.Components.Button
96
+
97
+
<TelerikButton OnClick="@NavigateCalendarProgrammatically">Go to new date and view</TelerikButton>
0 commit comments