Class DateRangePickerEvents<TValue>
Specifies the DateRangePicker Events of the component.
Inheritance
Namespace: Syncfusion.Blazor.Calendars
Assembly: Syncfusion.Blazor.dll
Syntax
public class DateRangePickerEvents<TValue> : OwningComponentBase
Type Parameters
Name | Description |
---|---|
TValue | Specifies the type of DateRangePickerEvents. |
Constructors
DateRangePickerEvents()
Declaration
public DateRangePickerEvents()
Properties
Blur
Gets or sets the event callback that will be invoked when the component loses the focus.
Declaration
public EventCallback<BlurEventArgs> Blur { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<BlurEventArgs> |
Cleared
Gets or sets the event callback that will be invoked when the component value is cleared using clear button.
Declaration
public EventCallback<ClearedEventArgs> Cleared { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<ClearedEventArgs> |
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> |
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> |
Focus
Gets or sets the event callback that will be invoked when the component gets focus.
Declaration
public EventCallback<FocusEventArgs> Focus { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<FocusEventArgs> |
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
<SfDateRangePicker TValue="DateTime?">
<DateRangePickerEvents TValue="DateTime?" Navigated="@ViewNavigated" />
</SfDateRangePicker>
@code{
private void ViewNavigated(NavigatedEventArgs args) {
Console.WriteLine(args.View);
}
}
OnClose
Gets or sets the event callback that will be invoked when the popup is closed.
Declaration
public EventCallback<RangePopupEventArgs> OnClose { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<RangePopupEventArgs> |
Examples
<SfDateRangePicker TValue="DateTime?">
<DateRangePickerEvents TValue="DateTime?" OnClose="@PopupClose" />
</SfDateRangePicker>
@code{
private void PopupClose(RangePopupEventArgs args) {
args.Cancel = true;
}
}
OnOpen
Gets or sets the event callback that will be invoked when the popup is opened.
Declaration
public EventCallback<RangePopupEventArgs> OnOpen { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<RangePopupEventArgs> |
Examples
<SfDateRangePicker TValue="DateTime?">
<DateRangePickerEvents TValue="DateTime?" OnOpen="@PopupClose" />
</SfDateRangePicker>
@code{
private void PopupClose(RangePopupEventArgs args) {
args.Cancel = true;
}
}
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
<SfDateRangePicker TValue="DateTime?">
<DateRangePickerEvents TValue="DateTime?" OnRenderDayCell="@CellRendered" />
</SfDateRangePicker>
@code{
private void CellRendered(RenderDayCellEventArgs args) {
args.CellData.ClassList = "e-custom-style";
}
}
RangeSelected
Gets or sets the event callback that will be invoked after selecting the start and end date from the component.
Declaration
public EventCallback<RangePickerEventArgs<TValue>> RangeSelected { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<RangePickerEventArgs<TValue>> |
Examples
<SfDateRangePicker TValue="DateTime?">
<DateRangePickerEvents TValue="DateTime?" RangeSelected="@RangeSelected" />
</SfDateRangePicker>
@code{
private void RangeSelected(RangePickerEventArgs<DateTime?> args) {
Console.WriteLine(args.StartDate + " - " + args.EndDate);
}
}
ValueChange
Gets or sets the event callback that will be invoked when the component value is changed.
Declaration
public EventCallback<RangePickerEventArgs<TValue>> ValueChange { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<RangePickerEventArgs<TValue>> |
Examples
<SfDateRangePicker TValue="DateTime?">
<DateRangePickerEvents TValue="DateTime?" ValueChange="@ValueChanged" />
</SfDateRangePicker>
@code{
private void ValueChanged(RangePickerEventArgs<DateTime?> args) {
Console.WriteLine(args.StartDate + " - " + args.EndDate);
}
}
Methods
OnInitializedAsync()
Triggers while initial rendering of the component.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |