Class CalendarEvents<TValue>
Specifies the Calendar Events of the component.
Inheritance
Namespace: Syncfusion.Blazor.Calendars
Assembly: Syncfusion.Blazor.dll
Syntax
public class CalendarEvents<TValue> : OwningComponentBase
Type Parameters
Name | Description |
---|---|
TValue | Specifies the type of CalendarEvents. |
Constructors
CalendarEvents()
Declaration
public CalendarEvents()
Properties
Created
Gets or sets the event callback that will be invoked when the component is created.
Declaration
public EventCallback<object> Created { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
DeSelected
Gets or sets the event callback that will be invoked after deselecting the value from Calendar. This event will trigger when enable the multiple date selection.
Declaration
public EventCallback<DeSelectedEventArgs<TValue>> DeSelected { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<DeSelectedEventArgs<TValue>> |
Remarks
This event will trigger when enable the IsMultiSelection property.
Examples
<SfCalendar TValue="DateTime?" IsMultiSelection=true>
<CalendarEvents TValue="DateTime?" DeSelected="@ValueDeselected"/>
</SfCalendar>
@code{
private void ValueDeselected(DeSelectedEventArgs<DateTime?> args) {
Console.WriteLine(args.Value);
}
}
Destroyed
Gets or sets the event callback that will be invoked when the component is destroyed.
Declaration
public EventCallback<object> Destroyed { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Navigated
Gets or sets the event callback that will be invoked when the Calendar is navigated to another level or within the same level of view.
Declaration
public EventCallback<NavigatedEventArgs> Navigated { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<NavigatedEventArgs> |
Examples
<SfCalendar TValue="DateTime?">
<CalendarEvents TValue="DateTime?" Navigated="@ViewNavigated" />
</SfCalendar>
@code{
private void ViewNavigated(NavigatedEventArgs args) {
Console.WriteLine(args.View);
}
}
OnRenderDayCell
Gets or sets the event callback that will be invoked when each day cell of the Calendar is rendered.
Declaration
public EventCallback<RenderDayCellEventArgs> OnRenderDayCell { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<RenderDayCellEventArgs> |
Examples
<SfCalendar TValue="DateTime?">
<CalendarEvents TValue="DateTime?" OnRenderDayCell="@CellRendered" />
</SfCalendar>
@code{
private void CellRendered(RenderDayCellEventArgs args) {
args.CellData.ClassList = "e-custom-style";
}
}
Selected
Gets or sets the event callback that will be invoked after selecting the date values from Calendar.
Declaration
public EventCallback<SelectedEventArgs<TValue>> Selected { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<SelectedEventArgs<TValue>> |
Examples
<SfCalendar TValue="DateTime?">
<CalendarEvents TValue="DateTime?" Selected="@ValueSelected"/>
</SfCalendar>
@code{
private void ValueSelected(SelectedEventArgs<DateTime?> args) {
Console.WriteLine(args.Value);
}
}
ValueChange
Gets or sets the event callback that will be invoked when the Values property changed.
Declaration
public EventCallback<ChangedEventArgs<TValue>> ValueChange { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<ChangedEventArgs<TValue>> |
Examples
<SfCalendar TValue="DateTime?">
<CalendarEvents TValue="DateTime?" ValueChange="@ValueChange"/>
</SfCalendar>
@code{
private void ValueChange(ChangedEventArgs<DateTime?> args) {
Console.WriteLine(args.Value);
}
}
Methods
OnInitializedAsync()
Triggers while initial rendering of the calendar component.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task. |