Skip to content

Commit 36ad509

Browse files
committed
docs(material/datepicker): fix up dialog example (#31674)
The example that shows a datepicker inside a dialog looked weird. These changes fix it up. (cherry picked from commit e478208)
1 parent 3fec8a7 commit 36ad509

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<h2 mat-dialog-title>Datepicker in a Dialog</h2>
2-
<mat-dialog-content align="center">
3-
<mat-form-field>
2+
<mat-dialog-content>
3+
<mat-form-field subscriptSizing="dynamic">
44
<mat-label>Select a date</mat-label>
55
<input matInput [matDatepicker]="picker" [formControl]="date">
66
<mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
77
<mat-datepicker #picker></mat-datepicker>
88
</mat-form-field>
99
</mat-dialog-content>
10-
<mat-dialog-actions>
11-
<button matButton mat-dialog-close>Clear</button>
12-
<button matButton [mat-dialog-close]="date.value" cdkFocusInitial>Ok</button>
10+
<mat-dialog-actions align="end">
11+
<button matButton mat-dialog-close>CANCEL</button>
12+
<button matButton [mat-dialog-close]="date.value" cdkFocusInitial>OK</button>
1313
</mat-dialog-actions>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<p>Selected date: {{selectedDate()}}</p>
2-
<button matButton="filled" color="primary" (click)="openDialog()">Open Dialog</button>
2+
<button matButton="filled" color="primary" (click)="openDialog()">Open Dialog</button>

src/components-examples/material/datepicker/datepicker-dialog/datepicker-dialog-example.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export class DatepickerDialogExample {
2929

3030
openDialog() {
3131
const dialogRef = this.dialog.open(DatepickerDialogExampleDialog, {
32-
minWidth: '500px',
3332
data: {selectedDate: this.selectedDate()},
3433
});
3534

0 commit comments

Comments
 (0)