@progress/kendo-angular-scheduler
Version:
Kendo UI Scheduler Angular - Outlook or Google-style angular scheduler calendar. Full-featured and customizable embedded scheduling from the creator developers trust for professional UI components.
51 lines (50 loc) • 2.97 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { Directive, Optional, TemplateRef } from '@angular/core';
import * as i0 from "@angular/core";
/**
* Represents the toolbar template of the Scheduler. To define a toolbar template, nest an `<ng-template kendoSchedulerToolbarTemplate>` tag inside the `<kendo-scheduler>`. For more information and examples, see [customizing the toolbar](slug:toolbar_scheduler) article.
*
* The template context provides the following variables:
* * `selectedDate`—The currently selected date.
* * `dateRange`—The currently selected [`DateRange`](slug:api_scheduler_daterange).
* * `views`—An array of [`SchedulerView`](slug:api_scheduler_schedulerview) instances with the available views.
* * `selectedView`—The currently selected [`SchedulerView`](slug:api_scheduler_schedulerview).
*
* You can declare either of the following built-in navigation components in the toolbar template:
* * `kendoSchedulerToolbarNavigation`—Renders navigation buttons, a calendar, and a date-range label.
* * `kendoSchedulerToolbarViewSelector`—Renders the buttons for selecting the view.
*
* To emit navigation events, components inside the toolbar can inject the [`ToolbarService`](slug:api_scheduler_toolbarservice).
*
* @example
* ```html
* <kendo-scheduler>
* <ng-template kendoSchedulerToolbarTemplate let-selectedDate="selectedDate">
* <div class="custom-toolbar">
* <span>Selected Date: {{ selectedDate | date: 'longDate' }}</span>
* <button kendoButton (click)="navigateToToday()">Today</button>
* </div>
* </ng-template>
* </kendo-scheduler>
* ```
*/
export class ToolbarTemplateDirective {
templateRef;
constructor(templateRef) {
this.templateRef = templateRef;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ToolbarTemplateDirective, isStandalone: true, selector: "[kendoSchedulerToolbarTemplate]", ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarTemplateDirective, decorators: [{
type: Directive,
args: [{
selector: '[kendoSchedulerToolbarTemplate]',
standalone: true
}]
}], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
type: Optional
}] }] });