Class NavigatedEventArgs
Provides event arguments for the Navigated event when calendar navigation occurs.
Inheritance
Namespace: Syncfusion.Blazor.Calendars
Assembly: Syncfusion.Blazor.dll
Syntax
public class NavigatedEventArgs : Object
Remarks
This class contains information about calendar navigation events, including the focused date, current view, and the original browser event that triggered the navigation. Navigation can occur when users change months, years, or decades in the calendar view.
Examples
<SfCalendar TValue="DateTime?">
<CalendarEvents TValue="DateTime?" Navigated="OnNavigated"></CalendarEvents>
</SfCalendar>
@code {
void OnNavigated(NavigatedEventArgs args)
{
Console.WriteLine($"Navigated to: {args.Date} in {args.View} view");
}
}
Constructors
NavigatedEventArgs()
Declaration
public NavigatedEventArgs()
Properties
Date
Gets or sets the focused date in the calendar view after navigation.
Declaration
public DateTime Date { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | A System.DateTime value representing the focused date in the calendar view. |
Remarks
This property indicates which date has focus after the navigation event occurs. The focused date determines which date is highlighted or has keyboard focus in the current view.
Event
Gets or sets the original browser event that triggered the navigation.
Declaration
public object Event { get; set; }
Property Value
Type | Description |
---|---|
System.Object | An |
Remarks
This property contains the raw browser event information, such as click or keyboard events, that caused the calendar navigation to occur. It provides access to the underlying event details.
Name
Gets or sets the name of the navigation event.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | A |
Remarks
This property specifies the name identifier for the navigation event, which can be used to identify the specific type of navigation that occurred in event handling scenarios.
View
Gets or sets the current view of the calendar after navigation.
Declaration
public string View { get; set; }
Property Value
Type | Description |
---|---|
System.String | A |
Remarks
This property indicates the calendar view that is currently displayed after the navigation event. Common values include "Month" for month view, "Year" for year view, and "Decade" for decade view.