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:
Kristiyan Kostadinov
2017-06-23 00:44:44 +02:00
committed by Jeremy Elbourn
parent 3d8c8333cf
commit 8b6efb12e8
+4 -4
View File
@@ -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;
}