Class DatePickerEvents<TValue>
Specifies the DatePicker Events of the component.
Inheritance
Namespace: Syncfusion.Blazor.Calendars
Assembly: Syncfusion.Blazor.dll
Syntax
public class DatePickerEvents<TValue> : OwningComponentBase
Type Parameters
Name | Description |
---|---|
TValue | Specifies the type of DatePickerEvents. |
Constructors
DatePickerEvents()
Declaration
public DatePickerEvents()
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
<SfDatePicker TValue="DateTime?">
<DatePickerEvents TValue="DateTime?" Navigated="@ViewNavigated" />
</SfDatePicker>
@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<PopupObjectArgs> OnClose { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<PopupObjectArgs> |
Examples
<SfDatePicker TValue="DateTime?">
<DatePickerEvents TValue="DateTime?" OnClose="@PopupClose" />
</SfDatePicker>
@code{
private void PopupClose(PopupObjectArgs args) {
args.Cancel = true;
}
}
OnOpen
Gets or sets the event callback that will be invoked when the popup is opened.
Declaration
public EventCallback<PopupObjectArgs> OnOpen { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<PopupObjectArgs> |
Examples
<SfDatePicker TValue="DateTime?">
<DatePickerEvents TValue="DateTime?" OnOpen="@PopupOpen" />
</SfDatePicker>
@code{
private void PopupOpen(PopupObjectArgs 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
<SfDatePicker TValue="DateTime?">
<DatePickerEvents TValue="DateTime?" OnRenderDayCell="CellRendered" />
</SfDatePicker>
@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 value from the component.
Declaration
public EventCallback<SelectedEventArgs<TValue>> Selected { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<SelectedEventArgs<TValue>> |
Examples
<SfDatePicker TValue="DateTime?">
<DatePickerEvents TValue="DateTime?" Selected="@ValueSelected" />
</SfDatePicker>
@code{
private void ValueSelected(SelectedEventArgs<DateTime?> args) {
Console.WriteLine(args.Value);
}
}
ValueChange
Gets or sets the event callback that will be invoked when the component value is changed.
Declaration
public EventCallback<ChangedEventArgs<TValue>> ValueChange { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<ChangedEventArgs<TValue>> |
Examples
<SfDatePicker TValue="DateTime?">
<DatePickerEvents TValue="DateTime?" ValueChange="@ValueChange" />
</SfDatePicker>
@code{
private void ValueChange(ChangedEventArgs<DateTime?> args) {
Console.WriteLine(args.Value);
}
}
Methods
OnInitializedAsync()
Triggers while initial rendring of the component.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The System.Threading.Tasks.Task. |