@ux-aspects/ux-aspects
Version:
Open source user interface framework for building modern, responsive, mobile big data applications
53 lines (52 loc) • 1.83 kB
TypeScript
import { Subject } from 'rxjs';
import * as i0 from "@angular/core";
export declare class DateRangeService {
/** Indicate whether we want to show a date range */
isRange: boolean;
/** Specify the direction of the selection */
direction: DateRangePicker;
/** Specify the start of the range */
start: Date;
/** Specify the end of the range */
end: Date;
/** Specify the date we are hovering over */
hover: Date;
/** Emit whenever the start date changes */
onStartChange: Subject<Date>;
/** Emit whenever the end date changes */
onEndChange: Subject<Date>;
/** Emit whenever the range has changed */
onRangeChange: Subject<void>;
/** Emit whenever the hover date changes */
onHoverChange: Subject<void>;
/** Emit whenever the range is cleared */
onClear: Subject<void>;
/** Indicate if we should show time */
showTime: boolean;
/** Defines the aria label for the range start picker */
startPickerAriaLabel: string;
/** Defines the aria label for the range end picker */
endPickerAriaLabel: string;
/** Indicate if we are currently changing the time */
isChangingTime: boolean;
/** Store the current start time */
startTime: DateRangeTime;
/** Store the current end time */
endTime: DateRangeTime;
setStartDate(date: Date | null): void;
setEndDate(date: Date | null): void;
clear(): void;
setDateMouseEnter(date: Date | null): void;
setDateMouseLeave(date: Date): void;
static ɵfac: i0.ɵɵFactoryDeclaration<DateRangeService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<DateRangeService>;
}
export declare enum DateRangePicker {
Start = "start",
End = "end"
}
export interface DateRangeTime {
hours: number;
minutes: number;
seconds: number;
}