ngx-timezones
Version:
An Angular module for timezones (based on moment.js)
41 lines (40 loc) • 1.2 kB
TypeScript
import { OnInit, EventEmitter, ChangeDetectorRef } from '@angular/core';
import { FormControl } from '@angular/forms';
import { Observable } from 'rxjs';
interface TimezoneGroup {
country: string;
iso: string;
showGroup?: boolean;
zones: {
zone: string;
name: string;
offset: string;
}[];
}
export declare class NgxTimezonesComponent implements OnInit {
private cdRef;
timezoneCtrl: FormControl;
timezoneGroups: TimezoneGroup[];
timezoneGroupsOptions: Observable<TimezoneGroup[]>;
searchControl: FormControl;
timezoneChange: EventEmitter<string>;
set timezone(timezone: string);
set disabled(value: boolean);
guess: boolean;
showOffset: boolean;
placeholder: string;
searchPlaceholder: string;
noResultsLabel: string;
offsetName: string;
constructor(cdRef: ChangeDetectorRef);
ngOnInit(): void;
guessedTimezone(): void;
emitTimezone(zone: any): void;
initData(): void;
filter(query: string): TimezoneGroup[];
formatTimezoneString(zone: string): string;
offsetOfTimezone(zone: string): string;
formatOffset(offset: string): string;
private rjust;
}
export {};