Skip to content

Commit b6fc003

Browse files
author
Tobias Schweizer
committed
refactor (MatCalendarHeader): fix styling issue
1 parent 94c825a commit b6fc003

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

src/demo-app/datepicker/custom-header.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.custom-header {
2-
padding: 1.5em;
2+
padding: 1em 1.5em;
33
display: flex;
4+
align-items: center;
45
}
56

67
.custom-header-label {

src/demo-app/datepicker/datepicker-demo.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,6 @@ <h2>Options</h2>
3939
</mat-form-field>
4040
</p>
4141

42-
<h2>Datepicker with custom header</h2>
43-
<p>
44-
<mat-form-field>
45-
<mat-label>Custom calendar header</mat-label>
46-
<input matInput [matDatepicker]="customCalendarHeaderPicker"
47-
[disabled]="inputDisabled">
48-
<mat-datepicker-toggle matSuffix [for]="customCalendarHeaderPicker"></mat-datepicker-toggle>
49-
<mat-datepicker #customCalendarHeaderPicker [touchUi]="touch" [disabled]="datepickerDisabled" [calendarHeaderComponent]="customHeader"></mat-datepicker>
50-
</mat-form-field>
51-
</p>
52-
5342
<h2>Result</h2>
5443

5544
<p>
@@ -155,3 +144,14 @@ <h2>Datepicker with value property binding</h2>
155144
[startView]="yearView ? 'year' : 'month'"></mat-datepicker>
156145
</mat-form-field>
157146
</p>
147+
148+
<h2>Datepicker with custom header</h2>
149+
<p>
150+
<mat-form-field>
151+
<mat-label>Custom calendar header</mat-label>
152+
<input matInput [matDatepicker]="customCalendarHeaderPicker"
153+
[disabled]="inputDisabled">
154+
<mat-datepicker-toggle matSuffix [for]="customCalendarHeaderPicker"></mat-datepicker-toggle>
155+
<mat-datepicker #customCalendarHeaderPicker [touchUi]="touch" [disabled]="datepickerDisabled" [calendarHeaderComponent]="customHeader"></mat-datepicker>
156+
</mat-form-field>
157+
</p>

0 commit comments

Comments
 (0)