Skip to content

Commit 06c7ab7

Browse files
crisbetommalerba
authored andcommitted
docs(datepicker): switch examples to non-deprecated form field appearance (#19653)
Switches all of the datepicker examples to use the fill form field appearance, similarly to what we did in the form field examples a few months ago.
1 parent 80ce354 commit 06c7ab7

File tree

21 files changed

+29
-28
lines changed

21 files changed

+29
-28
lines changed

src/components-examples/material/datepicker/date-range-picker-comparison/date-range-picker-comparison-example.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<mat-form-field class="example-form-field">
1+
<mat-form-field class="example-form-field" appearance="fill">
22
<mat-label>First campaign</mat-label>
33
<mat-date-range-input
44
[formGroup]="campaignOne"
@@ -12,7 +12,7 @@
1212
<mat-date-range-picker #campaignOnePicker></mat-date-range-picker>
1313
</mat-form-field>
1414

15-
<mat-form-field class="example-form-field">
15+
<mat-form-field class="example-form-field" appearance="fill">
1616
<mat-label>Second campaign</mat-label>
1717
<mat-date-range-input
1818
[formGroup]="campaignTwo"

src/components-examples/material/datepicker/date-range-picker-forms/date-range-picker-forms-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<mat-form-field>
1+
<mat-form-field appearance="fill">
22
<mat-label>Enter a date range</mat-label>
33
<mat-date-range-input [formGroup]="range" [rangePicker]="picker">
44
<input matStartDate formControlName="start" placeholder="Start date">

src/components-examples/material/datepicker/date-range-picker-overview/date-range-picker-overview-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<mat-form-field>
1+
<mat-form-field appearance="fill">
22
<mat-label>Enter a date range</mat-label>
33
<mat-date-range-input [rangePicker]="picker">
44
<input matStartDate placeholder="Start date">

src/components-examples/material/datepicker/date-range-picker-selection-strategy/date-range-picker-selection-strategy-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<mat-form-field>
1+
<mat-form-field appearance="fill">
22
<mat-label>Enter a date range</mat-label>
33
<mat-date-range-input [rangePicker]="picker">
44
<input matStartDate placeholder="Start date">
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
<mat-form-field class="example-full-width">
2-
<input matInput [matDatepicker]="picker" placeholder="Choose a date">
1+
<mat-form-field class="example-full-width" appearance="fill">
2+
<mat-label>Choose a date</mat-label>
3+
<input matInput [matDatepicker]="picker">
34
<mat-datepicker #picker></mat-datepicker>
45
</mat-form-field>
56
<button mat-raised-button (click)="picker.open()">Open</button>

src/components-examples/material/datepicker/datepicker-color/datepicker-color-example.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<mat-form-field color="accent">
1+
<mat-form-field color="accent" appearance="fill">
22
<mat-label>Inherited calendar color</mat-label>
33
<input matInput [matDatepicker]="picker1">
44
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
55
<mat-datepicker #picker1></mat-datepicker>
66
</mat-form-field>
77

8-
<mat-form-field color="accent">
8+
<mat-form-field color="accent" appearance="fill">
99
<mat-label>Custom calendar color</mat-label>
1010
<input matInput [matDatepicker]="picker2">
1111
<mat-datepicker-toggle matSuffix [for]="picker2"></mat-datepicker-toggle>

src/components-examples/material/datepicker/datepicker-custom-header/datepicker-custom-header-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<mat-form-field>
1+
<mat-form-field appearance="fill">
22
<mat-label>Custom calendar header</mat-label>
33
<input matInput [matDatepicker]="picker">
44
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>

src/components-examples/material/datepicker/datepicker-custom-icon/datepicker-custom-icon-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<mat-form-field class="example-full-width">
1+
<mat-form-field class="example-full-width" appearance="fill">
22
<mat-label>Choose a date</mat-label>
33
<input matInput [matDatepicker]="picker">
44
<mat-datepicker-toggle matSuffix [for]="picker">

src/components-examples/material/datepicker/datepicker-date-class/datepicker-date-class-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<mat-form-field class="example-full-width">
1+
<mat-form-field class="example-full-width" appearance="fill">
22
<mat-label>Choose a date</mat-label>
33
<input matInput [matDatepicker]="picker">
44
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>

src/components-examples/material/datepicker/datepicker-disabled/datepicker-disabled-example.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p>
2-
<mat-form-field>
2+
<mat-form-field appearance="fill">
33
<mat-label>Completely disabled</mat-label>
44
<input matInput [matDatepicker]="dp1" disabled>
55
<mat-datepicker-toggle matSuffix [for]="dp1"></mat-datepicker-toggle>
@@ -8,7 +8,7 @@
88
</p>
99

1010
<p>
11-
<mat-form-field>
11+
<mat-form-field appearance="fill">
1212
<mat-label>Popup disabled</mat-label>
1313
<input matInput [matDatepicker]="dp2">
1414
<mat-datepicker-toggle matSuffix [for]="dp2" disabled></mat-datepicker-toggle>
@@ -17,7 +17,7 @@
1717
</p>
1818

1919
<p>
20-
<mat-form-field>
20+
<mat-form-field appearance="fill">
2121
<mat-label>Input disabled</mat-label>
2222
<input matInput [matDatepicker]="dp3" disabled>
2323
<mat-datepicker-toggle matSuffix [for]="dp3"></mat-datepicker-toggle>

0 commit comments

Comments
 (0)