UNPKG

@ux-aspects/ux-aspects

Version:

Open source user interface framework for building modern, responsive, mobile big data applications

83 lines (82 loc) 5.43 kB
import { WeekDay } from '@angular/common'; import { AfterViewInit, EventEmitter, OnDestroy, OnInit } from '@angular/core'; import { DatePickerMode, DateTimePickerService } from './date-time-picker.service'; import { DateTimePickerTimezone } from './date-time-picker.utils'; import * as i0 from "@angular/core"; export declare class DateTimePickerComponent implements OnInit, AfterViewInit, OnDestroy { readonly datepicker: DateTimePickerService; private readonly _rangeService; private readonly _rangeOptions; /** Defines whether or not the date picker should be visible. */ set showDate(value: boolean); /** Defines whether or not the time picker should be visible. */ set showTime(value: boolean); /** Defines whether or not the time picker should allow the user to choose a timezone. */ set showTimezone(value: boolean); /** Defines whether or not the time picker should allow the user to specify seconds. */ set showSeconds(value: boolean); /** Defines whether or not the time picker should show an AM/PM button, or time should be represented in 24hr format instead. */ set showMeridian(value: boolean); /** Defines whether or not the time picker should allow the user to select the time using spinners. */ set showSpinners(value: boolean); /** If defined will override the weekday names displayed. */ set weekdays(value: string[]); /** Defines the names of the months. */ set months(months: string[]); /** Defines the short names of each month. */ set monthsShort(months: string[]); /** Defines the labels to show in the meridian (AM/PM) selector. */ set meridians(meridians: string[]); /** Defines the text to be displayed in the button used to set the selected time to the current time. */ set nowBtnText(value: string); /** Specify whether or not to show the show now button */ set showNowBtn(value: boolean); /** * Defines the list of available timezones. The `DateTimePickerTimezone` interface specifies that each timezone should * be an object with a `name` property that represents the timezone, eg. `GMT+2`, and an `offset` property that represents * the number of minutes relative to GMT the timezone is. */ set timezones(value: DateTimePickerTimezone[]); /** Defines the day of the week that should appear in the first column. `WeekDay` is an enumeration available in `@angular/common`. */ set startOfWeek(startOfWeek: WeekDay); /** Define the aria label for the now button */ nowBtnAriaLabel: string; /** Emits an event when the date is changed using the component. */ dateChange: EventEmitter<Date>; /** If not defined the picker will try to use the user's timezone. If that is not available, it will revert to GMT. */ timezoneChange: EventEmitter<DateTimePickerTimezone>; /** The selected date to be displayed in the component. */ set date(value: Date); /** Will set the selected timezone. */ set timezone(value: DateTimePickerTimezone); /** The earliest selectable date. */ set min(value: Date); /** The latest selectable date. */ set max(value: Date); /** Determine if we are in range selection mode */ get _isRangeMode(): boolean; /** Determine if this picker is the start picker */ get _isRangeStart(): boolean; /** Determine if this picker is the end picker */ get _isRangeEnd(): boolean; /** Determine if the today button is disabled */ get _isTodayDisabled(): boolean; DatePickerMode: typeof DatePickerMode; private readonly _onDestroy; constructor(); ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; /** * Change the date to the current date and time */ setToNow(): void; _onTimezoneChange(timezone: DateTimePickerTimezone): void; /** * Update the service with the new timezone value, falling back on the default if it is undefined or * not present in `timezones`. */ private setTimezone; static ɵfac: i0.ɵɵFactoryDeclaration<DateTimePickerComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<DateTimePickerComponent, "ux-date-time-picker", never, { "showDate": { "alias": "showDate"; "required": false; }; "showTime": { "alias": "showTime"; "required": false; }; "showTimezone": { "alias": "showTimezone"; "required": false; }; "showSeconds": { "alias": "showSeconds"; "required": false; }; "showMeridian": { "alias": "showMeridian"; "required": false; }; "showSpinners": { "alias": "showSpinners"; "required": false; }; "weekdays": { "alias": "weekdays"; "required": false; }; "months": { "alias": "months"; "required": false; }; "monthsShort": { "alias": "monthsShort"; "required": false; }; "meridians": { "alias": "meridians"; "required": false; }; "nowBtnText": { "alias": "nowBtnText"; "required": false; }; "showNowBtn": { "alias": "showNowBtn"; "required": false; }; "timezones": { "alias": "timezones"; "required": false; }; "startOfWeek": { "alias": "startOfWeek"; "required": false; }; "nowBtnAriaLabel": { "alias": "nowBtnAriaLabel"; "required": false; }; "date": { "alias": "date"; "required": false; }; "timezone": { "alias": "timezone"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; }, { "dateChange": "dateChange"; "timezoneChange": "timezoneChange"; }, never, never, false, never>; }