menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DateRangePickerPreset - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DateRangePickerPreset

    Inheritance
    System.Object
    DateRangePickerPreset
    Implements
    System.IDisposable
    Namespace: Syncfusion.Blazor.Calendars
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class DateRangePickerPreset : OwningComponentBase, IDisposable

    Constructors

    DateRangePickerPreset()

    Declaration
    public DateRangePickerPreset()

    Properties

    End

    Gets or sets the end date for the preset range.

    Declaration
    public DateTime End { get; set; }
    Property Value
    Type Description
    System.DateTime

    A System.DateTime object that represents the end of the date range.

    Remarks

    This property defines the upper bound (inclusive) of the date range for this preset.

    Label

    Gets or sets the display text for the preset item in the SfDateRangePicker<TValue>.

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

    A string that serves as the display label for the preset. The default value is null.

    Remarks

    This label is displayed to the user in the list of available presets. For example, "Last 30 Days".

    Start

    Gets or sets the start date for the preset range.

    Declaration
    public DateTime Start { get; set; }
    Property Value
    Type Description
    System.DateTime

    A System.DateTime object that represents the beginning of the date range.

    Remarks

    This property defines the lower bound (inclusive) of the date range for this preset.

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder

    ComponentDispose(Boolean)

    Performs cleanup operations when the component is being disposed.

    Declaration
    protected void ComponentDispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    A bool indicating whether the method is called from System.IDisposable.Dispose.

    Remarks

    This method clears the reference to the parent component to prevent potential memory leaks.

    OnInitializedAsync()

    A protected lifecycle method that runs when the component is initialized.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    A System.Threading.Tasks.Task that represents the asynchronous initialization logic.

    Remarks

    This method registers the current preset with its parent DateRangePickerPresets component, making it available in the DateRangePicker's preset list.

    Implements

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