# Toolbar

Customize the Scheduler toolbar with templates or hide it completely to meet your application requirements.

The following example demonstrates how to customize the toolbar of the Scheduler and the following sections explain the implementation steps.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/scheduler/toolbar/template/source.txt)

## Declaring a Template

To customize the toolbar, declare an `<ng-template>` and decorate it with the [`kendoSchedulerToolbarTemplate`](https://www.telerik.com/kendo-angular-ui-develop/components/scheduler/api/toolbartemplatedirective) directive.

```html
<kendo-scheduler>
    <ng-template kendoSchedulerToolbarTemplate>
        
    </ng-template>

    ...
</kendo-scheduler>
```

## Setting the Template Context

The toolbar template context includes the following variables:

* `dateRange`—The current [`DateRange`](https://www.telerik.com/kendo-angular-ui-develop/components/scheduler/api/daterange) of the view.
* `selectedDate`—The currently selected date.
* `selectedView`—The currently selected [`SchedulerView`](https://www.telerik.com/kendo-angular-ui-develop/components/scheduler/api/schedulerview) view descriptor.
* `views`—An array of [`SchedulerView`](https://www.telerik.com/kendo-angular-ui-develop/components/scheduler/api/schedulerview) objects which describes the currently declared views.

You can bind the template variables to local variables by using the `let-` syntax.

```html
<kendo-scheduler>
    <ng-template kendoSchedulerToolbarTemplate
                 let-selectedDate="selectedDate">
        {{ selectedDate | date }}
    </ng-template>
    ...
</kendo-scheduler>
```

## Including the Built-in Components

You can add either of the following built-in navigation components to the toolbar template:

* [`kendoSchedulerToolbarNavigation`](https://www.telerik.com/kendo-angular-ui-develop/components/scheduler/api/toolbarnavigationcomponent)—Renders navigation buttons, a calendar, and a date-range label.
* [`kendoSchedulerToolbarViewSelector`](https://www.telerik.com/kendo-angular-ui-develop/components/scheduler/api/toolbarviewselectorcomponent)—Renders the buttons for selecting the view. Requires binding the `toolbarWidth` to the current Toolbar width through the [`schedulerResize`](https://www.telerik.com/kendo-angular-ui-develop/components/scheduler/api/schedulercomponent#schedulerresize) event.

The following example demonstrates a toolbar template that uses both built-in navigation and view selector components.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/scheduler/toolbar/template/source.txt)

## Using the Toolbar Service

The toolbar template can emit actions to the Scheduler by using the provided [`ToolbarService`](https://www.telerik.com/kendo-angular-ui-develop/components/scheduler/api/toolbarservice). `ToolbarService` provides the single `navigate` method which accepts a predefined [`NavigationAction`](https://www.telerik.com/kendo-angular-ui-develop/components/scheduler/api/navigationaction) type.

```ts
export class MyNavigationComponent {
    constructor(public toolbarService: ToolbarService) { }

    public next(): void {
        this.toolbarService.navigate({
            type: 'next'
        });
    }
}
```

## Hiding the Toolbar

Hide the Scheduler toolbar completely by setting the [`showToolbar`](https://www.telerik.com/kendo-angular-ui-develop/components/scheduler/api/schedulercomponent#showtoolbar) property to `false`.

```html
<kendo-scheduler [showToolbar]="false">
    <kendo-scheduler-day-view></kendo-scheduler-day-view>
    <kendo-scheduler-week-view></kendo-scheduler-week-view>
</kendo-scheduler>
```

This removes the entire toolbar, including navigation controls and view selector buttons. Users must navigate the Scheduler programmatically when the toolbar is hidden.

## Suggested Links

* [Angular Scheduler Overview](https://www.telerik.com/kendo-angular-ui-develop/components/scheduler)
* [`ToolbarTemplateDirective`](https://www.telerik.com/kendo-angular-ui-develop/components/scheduler/api/toolbartemplatedirective)
* [API Reference of the SchedulerComponent](https://www.telerik.com/kendo-angular-ui-develop/components/scheduler/api/schedulercomponent)
