menu

Blazor

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

    Show / Hide Table of Contents

    Class ChangedEventArgs<T>

    Provides event arguments for the ValueChange event when the calendar value changes.

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

    The type of the calendar value (typically System.DateTime or nullable System.DateTime).

    Remarks

    This class contains comprehensive information about the calendar value change, including the new value, whether the change was triggered by user interaction, and references to the DOM element and original event. This event provides detailed context for responding to calendar value changes in applications.

    Examples
    <SfCalendar TValue="DateTime?">
        <CalendarEvents TValue="DateTime?" ValueChange="OnValueChanged"></CalendarEvents>
    </SfCalendar>
    
    @code {
        void OnValueChanged(ChangedEventArgs<DateTime?> args)
        {
            if (args.IsInteracted)
            {
                Console.WriteLine($"User selected: {args.Value}");
            }
        }
    }

    Constructors

    ChangedEventArgs()

    Declaration
    public ChangedEventArgs()

    Properties

    Element

    Gets or sets the DOM element associated with the value change event.

    Declaration
    public object Element { get; set; }
    Property Value
    Type Description
    System.Object

    An object that represents the DOM element where the value change occurred. The default value is null.

    Remarks

    This property provides access to the DOM element that was involved in the value change event, allowing for additional manipulation or inspection of the element if needed.

    Event

    Gets or sets the original browser event that triggered the value change.

    Declaration
    public object Event { get; set; }
    Property Value
    Type Description
    System.Object

    An object containing the original event arguments from the browser. The default value is null.

    Remarks

    This property contains the raw browser event information, such as mouse click or keyboard events, that caused the calendar value to change. It can be used for advanced event handling scenarios.

    IsInteracted

    Gets or sets a value indicating whether the event was triggered by user interaction.

    Declaration
    public bool IsInteracted { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the current event was triggered by user interaction; otherwise, false.

    Remarks

    This property helps distinguish between programmatic value changes and user-initiated changes. When true, the value change was caused by user actions like clicking on a date. When false, the value change was likely caused by programmatic updates.

    Name

    Gets or sets the name of the event.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String

    A string value representing the event name. The default value is null.

    Remarks

    This property specifies the name identifier for the event, which can be used to identify the specific type of change event in scenarios where multiple event types are handled.

    Value

    Gets or sets the selected date value of the calendar.

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

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

    Remarks

    This property contains the primary selected date value when the calendar supports single selection. For multi-selection scenarios, use the Values property to access all selected dates.

    Values

    Gets or sets the multiple selected dates of the calendar.

    Declaration
    public DateTime[] Values { get; set; }
    Property Value
    Type Description
    System.DateTime[]

    An array of System.DateTime values representing all selected dates. The default value is null.

    Remarks

    This property is used when the calendar supports multiple date selection. It contains all the dates that are currently selected by the user. For single selection scenarios, this property may be null or contain only one date.

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