@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).
76 lines (75 loc) • 4.05 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 { 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 { NgIf, 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: "16.2.12", ngImport: i0, type: FooterComponent, deps: [{ token: i1.IntlService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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: `
<ng-template *ngIf="footerTemplateRef; else defaultRendering"
[ngTemplateOutlet]="footerTemplateRef"
[ngTemplateOutletContext]="{ activeView: activeViewValue, date: currentDate }">
</ng-template>
<ng-template #defaultRendering>
<button kendoButton
fillMode="flat"
themeColor="primary"
class="k-calendar-nav-today"
type="button"
tabindex="-1">
{{intl.formatDate(getToday(), 'D')}}
</button>
</ng-template>
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: "16.2.12", ngImport: i0, type: FooterComponent, decorators: [{
type: Component,
args: [{
selector: 'kendo-calendar-footer',
template: `
<ng-template *ngIf="footerTemplateRef; else defaultRendering"
[ngTemplateOutlet]="footerTemplateRef"
[ngTemplateOutletContext]="{ activeView: activeViewValue, date: currentDate }">
</ng-template>
<ng-template #defaultRendering>
<button kendoButton
fillMode="flat"
themeColor="primary"
class="k-calendar-nav-today"
type="button"
tabindex="-1">
{{intl.formatDate(getToday(), 'D')}}
</button>
</ng-template>
`,
standalone: true,
imports: [NgIf, NgTemplateOutlet, ButtonComponent]
}]
}], ctorParameters: function () { return [{ type: i1.IntlService }]; }, propDecorators: { showFooter: [{
type: HostBinding,
args: ['class.k-calendar-footer']
}], footerTemplateRef: [{
type: Input
}], activeViewValue: [{
type: Input
}], currentDate: [{
type: Input
}] } });