import { Component, ChangeDetectionStrategy, Input, Output, EventEmitter } from '@angular/core';
export interface BsCustomDates {
label: string;
value: Date | Date[];
}
@Component({
selector: 'bs-custom-date-view',
template: `
`,
changeDetection: ChangeDetectionStrategy.OnPush
})
export class BsCustomDatesViewComponent {
@Input() ranges?: BsCustomDates[];
@Input() selectedRange?: Date[];
@Input() customRangeLabel?: string;
@Output() onSelect = new EventEmitter();
selectFromRanges(range?: BsCustomDates) {
this.onSelect.emit(range);
}
}