Class DateTimePickerEvents<TValue>
Specifies the DateTimePicker Events of the component.
Inheritance
Namespace: Syncfusion.Blazor.Calendars
Assembly: Syncfusion.Blazor.dll
Syntax
public class DateTimePickerEvents<TValue> : OwningComponentBase
Type Parameters
Name | Description |
---|---|
TValue | Specifies the type of DateTimePickerEvents. |
Constructors
DateTimePickerEvents()
Declaration
public DateTimePickerEvents()
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
<SfDateTimePicker TValue="DateTime?">
<DateTimePickerEvents TValue="DateTime?" Navigated="@ViewNavigated" />
</SfDateTimePicker>
@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
<SfDateTimePicker TValue="DateTime?">
<DateTimePickerEvents TValue="DateTime?" OnClose="@PopupClose" />
</SfDateTimePicker>
@code{
private void PopupClose(PopupObjectArgs args) {
args.Cancel = true;
}
}
OnItemRender
Gets or sets the event callback that will be invoked while rendering the each popup list item.
Declaration
public EventCallback<ItemEventArgs<TValue>> OnItemRender { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<ItemEventArgs<TValue>> |
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
<SfDateTimePicker TValue="DateTime?">
<DateTimePickerEvents TValue="DateTime?" OnOpen="@PopupOpen" />
</SfDateTimePicker>
@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
<SfDateTimePicker TValue="DateTime?">
<DateTimePickerEvents TValue="DateTime?" OnRenderDayCell="CellRendered" />
</SfDateTimePicker>
@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
<SfDateTimePicker TValue="DateTime?">
<DateTimePickerEvents TValue="DateTime?" Selected="@ValueSelected" />
</SfDateTimePicker>
@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
<SfDateTimePicker TValue="DateTime?">
<DateTimePickerEvents TValue="DateTime?" ValueChange="@ValueChange" />
</SfDateTimePicker>
@code{
private void ValueChange(ChangedEventArgs<DateTime?> args) {
Console.WriteLine(args.Value);
}
}
Methods
ComponentDispose(Boolean)
Declaration
protected void ComponentDispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
OnInitializedAsync()
Triggers when the component is initially rendered.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task. |