@hxui/angular
Version:
An Angular library based on the [HXUI design system](https://hxui.io).
63 lines (62 loc) • 3.04 kB
TypeScript
import { DatePipe } from '@angular/common';
import { EventEmitter, OnInit } from '@angular/core';
import { DropdownDirective } from '../dropdown/dropdown.directive';
import { DateRangePickerConfig } from './date-range-picker.config';
import { DateRange, DateSelectionType, DisplayMode } from './date-range-picker.model';
import { IntervalItem } from './interval-option-model';
import * as i0 from "@angular/core";
export declare class DateRangePickerComponent implements OnInit {
private datePipe;
private dateRangePickerConfig;
dropdown: DropdownDirective;
/** Specifies interval options displayed under interval selection tab. */
intervalOptions: string[];
/** This attribute specifies the placeholder value of the components input element. */
placeholder: string;
/** Adds the disabled html attribute to the components dropdown element. */
disabled: boolean;
/**
* Indicates that dropdown will be closed on item or document
* click, and after pressing ESC.
*/
autoClose: boolean;
/** Specifies the position the datepicker opens against the input element */
placement: 'top' | 'bottom' | 'left' | 'right';
/** Specifies how tab(s) will be displayed. */
displayMode: DisplayMode;
/**
* A JavaScript Date object formatting string, formats the display
* of components current value.
*/
dateFormat: string;
defaultDateRange: DateRange;
/** Specifies whether caret down icon is displayed to right of input */
showCaretDown: boolean;
/**
* Emits a Date Range Object containing fromDate and toDate
* selected from the DateRangePicker.
*/
onDateRangeSelected: EventEmitter<DateRange>;
constructor(datePipe: DatePipe, dateRangePickerConfig: DateRangePickerConfig);
DateSelectionType: typeof DateSelectionType;
currentTab: DateSelectionType;
fromDate: Date;
toDate: Date;
_displayRange: string;
showIntervalOnly: boolean;
showCustomOnly: boolean;
showTab: boolean;
selectedInterval: IntervalItem;
intervalList: IntervalItem[];
ngOnInit(): void;
setInitialDateRange(): void;
resetDateRange(): void;
generateIntervalOptionItems(itemList: string[]): void;
hide(closeDropdown: boolean): void;
toggle(): void;
onCustomDateSelection(newCustomDate: Date[]): any;
onIntervalSelection(selectedItem: IntervalItem): void;
createDateRange(): string;
static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePickerComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<DateRangePickerComponent, "hxa-date-range-picker", never, { "intervalOptions": "intervalOptions"; "placeholder": "placeholder"; "disabled": "disabled"; "autoClose": "autoClose"; "placement": "placement"; "displayMode": "displayMode"; "dateFormat": "dateFormat"; "defaultDateRange": "defaultDateRange"; "showCaretDown": "showCaretDown"; }, { "onDateRangeSelected": "onDateRangeSelected"; }, never, never>;
}