igniteui-angular-sovn
Version:
Ignite UI for Angular is a dependency-free Angular toolkit for building modern web apps
60 lines (48 loc) • 2.09 kB
text/typescript
import { NgIf, NgTemplateOutlet } from '@angular/common';
import { Component, ViewChild, Output, EventEmitter, HostListener, HostBinding } from '@angular/core';
import { IBaseEventArgs } from '../../core/utils';
import { PickerInteractionMode } from '../../date-common/types';
import { IgxButtonDirective } from '../../directives/button/button.directive';
import { IgxRippleDirective } from '../../directives/ripple/ripple.directive';
import { IgxPickerActionsDirective } from '../picker-icons.common';
import { IgxCalendarComponent } from '../../calendar/calendar.component';
/** @hidden */
({
selector: 'igx-calendar-container',
styles: [':host {display: block;}'],
templateUrl: 'calendar-container.component.html',
standalone: true,
imports: [NgIf, IgxButtonDirective, IgxRippleDirective, IgxCalendarComponent, NgTemplateOutlet]
})
export class IgxCalendarContainerComponent {
(IgxCalendarComponent, { static: true })
public calendar: IgxCalendarComponent;
()
public calendarClose = new EventEmitter<IBaseEventArgs>();
()
public todaySelection = new EventEmitter<IBaseEventArgs>();
('class.igx-date-picker')
public styleClass = 'igx-date-picker';
('class.igx-date-picker--dropdown')
public get dropdownCSS(): boolean {
return this.mode === PickerInteractionMode.DropDown;
}
('class.igx-date-picker--vertical')
public get verticalCSS(): boolean {
return this.vertical && this.mode === PickerInteractionMode.Dialog;
}
public vertical = false;
public closeButtonLabel: string;
public todayButtonLabel: string;
public mode: PickerInteractionMode = PickerInteractionMode.DropDown;
public pickerActions: IgxPickerActionsDirective;
('keydown.alt.arrowup', ['$event'])
public onEscape(event) {
event.preventDefault();
this.calendarClose.emit();
}
public get isReadonly() {
return this.mode === PickerInteractionMode.Dialog;
}
}
/** @hidden */