mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(datepicker): pass layout direction to touchUi dialog (#5052)
Passes the datepicker trigger's direction to the dialog in `touchUi` mode. This was already being done for the datepicker in popup mode.
This commit is contained in:
committed by
Jeremy Elbourn
parent
3d8c8333cf
commit
8b6efb12e8
@@ -245,10 +245,10 @@ export class MdDatepicker<D> implements OnDestroy {
|
||||
|
||||
/** Open the calendar as a dialog. */
|
||||
private _openAsDialog(): void {
|
||||
let config = new MdDialogConfig();
|
||||
config.viewContainerRef = this._viewContainerRef;
|
||||
|
||||
this._dialogRef = this._dialog.open(MdDatepickerContent, config);
|
||||
this._dialogRef = this._dialog.open(MdDatepickerContent, {
|
||||
viewContainerRef: this._viewContainerRef,
|
||||
direction: this._dir ? this._dir.value : 'ltr'
|
||||
});
|
||||
this._dialogRef.afterClosed().subscribe(() => this.close());
|
||||
this._dialogRef.componentInstance.datepicker = this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user