menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SelectedEventArgs<T> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SelectedEventArgs<T>

    Provides event arguments for the Selected event when a date is selected in a calendar component.

    Inheritance
    System.Object
    SelectedEventArgs<T>
    Namespace: Syncfusion.Blazor.Calendars
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SelectedEventArgs<T> : Object
    Type Parameters
    Name Description
    T

    The type of the date value being selected (typically System.DateTime or nullable System.DateTime).

    Remarks

    This class contains the selected date value when a user selects a date in the calendar component. The generic type parameter allows for flexibility in the date value type used by different calendar implementations.

    Examples
    <SfCalendar TValue="DateTime?">
        <CalendarEvents TValue="DateTime?" Selected="OnDateSelected"></CalendarEvents>
    </SfCalendar>
    
    @code {
        void OnDateSelected(SelectedEventArgs<DateTime?> args)
        {
            Console.WriteLine($"Selected date: {args.Value}");
        }
    }

    Constructors

    SelectedEventArgs()

    Declaration
    public SelectedEventArgs()

    Properties

    Value

    Gets or sets the selected date value.

    Declaration
    public T Value { get; set; }
    Property Value
    Type Description
    T

    A value of type T representing the date that was selected. The default value is default(T).

    Remarks

    This property contains the date value that was selected by the user in the calendar component. The type is determined by the generic parameter, allowing for different date value types.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved