@sd-angular/core
Version:
Sd Angular Core Lib
70 lines (69 loc) • 2.57 kB
TypeScript
import { EventEmitter, OnDestroy, AfterViewInit, ChangeDetectorRef, OnInit, ElementRef } from '@angular/core';
import { Moment } from 'moment';
import { FormGroup, NgForm, ValidatorFn } from '@angular/forms';
import { DeviceDetectorService } from 'ngx-device-detector';
import { MatDatepicker, MatDatepickerInputEvent } from '@angular/material/datepicker';
import { IFormConfiguration, SdFormControl, SdViewDefDirective } from '@sd-angular/core/common';
import { MatFormFieldAppearance } from '@angular/material/form-field';
import { SdLabelDefDirective } from '@sd-angular/core/common';
export declare const MY_FORMATS: {
parse: {
dateInput: string;
};
display: {
dateInput: string;
monthYearLabel: string;
dateA11yLabel: string;
monthYearA11yLabel: string;
};
};
export declare class SdDateMonth implements OnDestroy, OnInit, AfterViewInit {
#private;
private ref;
private formConfig;
id: string;
isMobileOrTablet: boolean;
set name(val: string);
appearance: MatFormFieldAppearance;
disableErrorMessage: boolean;
set _disableErrorMessage(val: boolean | '');
formControl: SdFormControl;
min: Date;
set _min(val: string | Date);
max: Date;
set _max(val: string | Date);
size: 'sm' | 'lg';
set form(val: NgForm | FormGroup);
set disabled(val: boolean | '');
isRequired: boolean;
set required(val: boolean | '');
inlineError: string;
set _inlineError(val: string);
label: string;
placeholder: string;
defaultTime: any;
set minDate(val: string | Date);
set maxDate(val: string | Date);
validator: (value: any) => string | Promise<string>;
sdChange: EventEmitter<any>;
set model(val: any);
modelChange: EventEmitter<any>;
sdView: SdViewDefDirective;
sdLabelDef: SdLabelDefDirective;
input: ElementRef;
datePicker: MatDatepicker<Moment>;
isFocused: boolean;
constructor(ref: ChangeDetectorRef, deviceService: DeviceDetectorService, formConfig: IFormConfiguration);
ngOnDestroy(): void;
ngOnInit(): void;
customInlineErrorValidator(): ValidatorFn;
ngAfterViewInit(): void;
onFocus: () => void;
onBlur: () => void;
onClick: () => void;
blur: () => void;
focus: () => void;
onChange: (event: MatDatepickerInputEvent<Moment>) => void;
clear: ($event: any) => void;
setMonthAndYear: (normalizedMonthAndYear: Moment, datepicker: MatDatepicker<Moment>) => void;
}