Back to Devexpress

DxSchedulerTodayToolbarItem Class

blazor-devexpress-dot-blazor-f9aa0752.md

latest3.2 KB
Original Source

DxSchedulerTodayToolbarItem Class

The toolbar item that allows you to navigate to the current date.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public class DxSchedulerTodayToolbarItem :
    SchedulerToolbarItemBase

Remarks

Users can click the Today button to navigate to the time interval that contains the current date.

The DxSchedulerTodayToolbarItem partly supports toolbar item functionality. Refer to the following list for additional information on available options: API Reference.

Note that Today buttons create a new group and have a predefined tooltip, unlike regular toolbar items:

PropertyToolbar Item Default ValuePrevious Interval Default Value
BeginGroupfalsetrue
Tooltip""Scheduler_TodayButton

The following example displays a Today button on the toolbar and changes its tooltip to display the current date:

razor
<DxScheduler StartDate="DateTime.Today"
             DataStorage="DataStorage">
    <Views>
        <DxSchedulerDayView />
    </Views>
    <ToolbarItems>
        <DxSchedulerTodayToolbarItem Tooltip=@GetCurrentDate() />
        <DxSchedulerPreviousIntervalToolbarItem />
        <DxSchedulerNextIntervalToolbarItem />
        <DxSchedulerDateNavigatorToolbarItem />
    </ToolbarItems>
</DxScheduler>

@code {
    string GetCurrentDate() {
        return "Today is " + DateTime.Today.ToString("MMMM dd, yyyy");
    }
}

Implements

IComponent

IHandleEvent

IHandleAfterRender

IAsyncDisposable

Inheritance

Object ComponentBase DxComponentBase DxModelComponent DxToolbarItemBase DxToolbarItem DevExpress.Blazor.Scheduler.Internal.SchedulerToolbarItemBase DxSchedulerTodayToolbarItem

See Also

DxSchedulerTodayToolbarItem Members

DevExpress.Blazor Namespace