Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e478208

Browse files
docs(material/datepicker): fix up dialog example (#31674)
The example that shows a datepicker inside a dialog looked weird. These changes fix it up.
1 parent 5ffea29 commit e478208

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-contentalign="center">
3-
<mat-form-field>
2+
<mat-dialog-content>
3+
<mat-form-fieldsubscriptSizing="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-actionsalign="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)

AltStyle によって変換されたページ (->オリジナル) /