UNPKG

@progress/kendo-angular-dateinputs

Version:

Kendo UI for Angular Date Inputs Package - Everything you need to add date selection functionality to apps (DatePicker, TimePicker, DateInput, DateRangePicker, DateTimePicker, Calendar, and MultiViewCalendar).

78 lines (77 loc) 3.76 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Component, HostBinding, Input, TemplateRef } from '@angular/core'; import { getToday } from '../util'; import { IntlService } from '@progress/kendo-angular-intl'; import { ButtonComponent } from '@progress/kendo-angular-buttons'; import { NgTemplateOutlet } from '@angular/common'; import * as i0 from "@angular/core"; import * as i1 from "@progress/kendo-angular-intl"; /** * @hidden */ export class FooterComponent { intl; showFooter = true; footerTemplateRef; activeViewValue; currentDate; getToday = getToday; constructor(intl) { this.intl = intl; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FooterComponent, deps: [{ token: i1.IntlService }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: FooterComponent, isStandalone: true, selector: "kendo-calendar-footer", inputs: { footerTemplateRef: "footerTemplateRef", activeViewValue: "activeViewValue", currentDate: "currentDate" }, host: { properties: { "class.k-calendar-footer": "this.showFooter" } }, ngImport: i0, template: ` @if (footerTemplateRef) { <ng-template [ngTemplateOutlet]="footerTemplateRef" [ngTemplateOutletContext]="{ activeView: activeViewValue, date: currentDate }"> </ng-template> } @else { <button kendoButton fillMode="flat" themeColor="primary" class="k-calendar-nav-today" type="button" tabindex="-1"> {{intl.formatDate(getToday(), 'D')}} </button> } `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FooterComponent, decorators: [{ type: Component, args: [{ selector: 'kendo-calendar-footer', template: ` @if (footerTemplateRef) { <ng-template [ngTemplateOutlet]="footerTemplateRef" [ngTemplateOutletContext]="{ activeView: activeViewValue, date: currentDate }"> </ng-template> } @else { <button kendoButton fillMode="flat" themeColor="primary" class="k-calendar-nav-today" type="button" tabindex="-1"> {{intl.formatDate(getToday(), 'D')}} </button> } `, standalone: true, imports: [NgTemplateOutlet, ButtonComponent] }] }], ctorParameters: () => [{ type: i1.IntlService }], propDecorators: { showFooter: [{ type: HostBinding, args: ['class.k-calendar-footer'] }], footerTemplateRef: [{ type: Input }], activeViewValue: [{ type: Input }], currentDate: [{ type: Input }] } });