@angular/material/datepicker#MatDatepickerIntl TypeScript Examples
The following examples show how to use
@angular/material/datepicker#MatDatepickerIntl.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: calendar.ts From angular-material-components with MIT License | 6 votes |
constructor(_intl: MatDatepickerIntl,
@Optional() private _dateAdapter: NgxMatDateAdapter<D>,
@Optional() @Inject(NGX_MAT_DATE_FORMATS) private _dateFormats: NgxMatDateFormats,
private _changeDetectorRef: ChangeDetectorRef) {
if (!this._dateAdapter) {
throw createMissingDateImplError('NgxDateAdapter');
}
if (!this._dateFormats) {
throw createMissingDateImplError('NGX_MAT_DATE_FORMATS');
}
this._intlChanges = _intl.changes.subscribe(() => {
_changeDetectorRef.markForCheck();
this.stateChanges.next();
});
}
Example #2
Source File: calendar.ts From ngx-mat-datetime-picker with MIT License | 6 votes |
constructor(_intl: MatDatepickerIntl,
@Optional() private _dateAdapter: NgxMatDateAdapter<D>,
@Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,
private _changeDetectorRef: ChangeDetectorRef) {
if (!this._dateAdapter) {
throw createMissingDateImplError('NgxDateAdapter');
}
if (!this._dateFormats) {
throw createMissingDateImplError('MAT_DATE_FORMATS');
}
this._intlChanges = _intl.changes.subscribe(() => {
_changeDetectorRef.markForCheck();
this.stateChanges.next();
});
}
Example #3
Source File: calendar.ts From angular-material-components with MIT License | 5 votes |
constructor(private _intl: MatDatepickerIntl,
@Inject(forwardRef(() => NgxMatCalendar)) public calendar: NgxMatCalendar<D>,
@Optional() private _dateAdapter: NgxMatDateAdapter<D>,
@Optional() @Inject(NGX_MAT_DATE_FORMATS) private _dateFormats: NgxMatDateFormats,
changeDetectorRef: ChangeDetectorRef) {
this.calendar.stateChanges.subscribe(() => changeDetectorRef.markForCheck());
}
Example #4
Source File: calendar.ts From ngx-mat-datetime-picker with MIT License | 5 votes |
constructor(private _intl: MatDatepickerIntl,
@Inject(forwardRef(() => NgxMatCalendar)) public calendar: NgxMatCalendar<D>,
@Optional() private _dateAdapter: NgxMatDateAdapter<D>,
@Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,
changeDetectorRef: ChangeDetectorRef) {
this.calendar.stateChanges.subscribe(() => changeDetectorRef.markForCheck());
}