alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class DateRangePickerPreset

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    DateRangePickerPreset
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.Dispose(bool)
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.Calendars
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class DateRangePickerPreset : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

    Constructors

    DateRangePickerPreset()

    Declaration
    public DateRangePickerPreset()

    Properties

    End

    Gets or sets the end date for the preset range.

    Declaration
    [Parameter]
    public DateTime End { get; set; }
    Property Value
    Type Description
    DateTime

    A 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
    [Parameter]
    public string Label { get; set; }
    Property Value
    Type Description
    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
    [Parameter]
    public DateTime Start { get; set; }
    Property Value
    Type Description
    DateTime

    A 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
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    ComponentDispose(bool)

    Performs cleanup operations when the component is being disposed.

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

    A bool indicating whether the method is called from 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
    Task

    A Task that represents the asynchronous initialization logic.

    Overrides
    ComponentBase.OnInitializedAsync()
    Remarks

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

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved