alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class ScheduleToolBarToday

    Represents a toolbar tool for navigating to the current date in the SfSchedule<TValue> component.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    ScheduleToolBarToday
    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.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.Schedule
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ScheduleToolBarToday : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Remarks

    This component renders a "Today" button that sets the SelectedDate property of the scheduler to the current date, enabling quick navigation to today's schedule.

    This component must be placed within a ScheduleToolBar component, which in turn must be within a SfSchedule<TValue> component.

    Examples

    Demonstrates how to use the ScheduleToolBarToday to add a "Today" button for navigating to the current date.

    <SfSchedule TValue="AppointmentData" @ref="Scheduler" @bind-SelectedDate="@SelectedDate">
        <ScheduleToolBar>
            <ScheduleToolBarToday />
        </ScheduleToolBar>
    </SfSchedule>
    @code {
        private SfSchedule<AppointmentData> Scheduler;
        private DateTime SelectedDate { get; set; } = DateTime.Today;
        public class AppointmentData
        {
            public string Subject { get; set; }
            public DateTime StartTime { get; set; }
            public DateTime EndTime { get; set; }
        }
    }

    Constructors

    ScheduleToolBarToday()

    Declaration
    public ScheduleToolBarToday()

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    Dispose(bool)

    Dispose unmanaged resources in the Syncfusion Blazor component.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    Boolean value to dispose the object.

    Overrides
    OwningComponentBase.Dispose(bool)

    OnInitializedAsync()

    Initializes the ScheduleToolBarToday component during the component initialization phase.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    Task

    A task representing the asynchronous operation.

    Overrides
    ComponentBase.OnInitializedAsync()
    Remarks

    This method performs the following initialization tasks:

    • Calls the base OnInitializedAsync method
    • Validates that the component is used within a ScheduleToolBar component and throws an InvalidOperationException if not
    • Registers this today navigation toolbar item with the parent ScheduleToolBar
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when ScheduleToolBarToday is not used within a ScheduleToolBar component.

    Implements

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