Skip to content

Commit

Permalink
fix(datepicker): pass layout direction to touchUi dialog (#5052)
Browse files Browse the repository at this point in the history
Passes the datepicker trigger's direction to the dialog in `touchUi` mode. This was already being done for the datepicker in popup mode.
  • Loading branch information
crisbeto authored and jelbourn committed Jun 22, 2017
1 parent 3d8c833 commit 8b6efb1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/datepicker/datepicker.ts
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8b6efb1

Please sign in to comment.