Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(datepicker): refactor datepicker toggle to support theming (#5317)
* fix(datepicker): refactor toggle to fix theming and allow it to be combined with button directives * update usages of datepicker toggle * change to suggested API * fix new uses of mdDatepickerToggle after rebase
- Loading branch information
1 parent
9b45681
commit 4255476
Showing
15 changed files
with
42 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<button md-icon-button type="button" [attr.aria-label]="_intl.openCalendarLabel" | ||
[disabled]="disabled" (click)="_open($event)"> | ||
<md-icon> | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="100%" height="100%" | ||
fill="currentColor" style="vertical-align: top"> | ||
<path d="M0 0h24v24H0z" fill="none"/> | ||
<path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"/> | ||
</svg> | ||
</md-icon> | ||
</button> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/material-examples/datepicker-filter/datepicker-filter-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<md-input-container class="example-full-width"> | ||
<input mdInput [mdDatepickerFilter]="myFilter" [mdDatepicker]="picker" placeholder="Choose a date"> | ||
<button mdSuffix [mdDatepickerToggle]="picker"></button> | ||
<md-datepicker-toggle mdSuffix [for]="picker"></md-datepicker-toggle> | ||
</md-input-container> | ||
<md-datepicker #picker></md-datepicker> |
2 changes: 1 addition & 1 deletion
2
src/material-examples/datepicker-min-max/datepicker-min-max-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<md-input-container class="example-full-width"> | ||
<input mdInput [min]="minDate" [max]="maxDate" [mdDatepicker]="picker" placeholder="Choose a date"> | ||
<button mdSuffix [mdDatepickerToggle]="picker"></button> | ||
<md-datepicker-toggle mdSuffix [for]="picker"></md-datepicker-toggle> | ||
</md-input-container> | ||
<md-datepicker #picker></md-datepicker> |
2 changes: 1 addition & 1 deletion
2
src/material-examples/datepicker-overview/datepicker-overview-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<md-input-container> | ||
<input mdInput [mdDatepicker]="picker" placeholder="Choose a date"> | ||
<button mdSuffix [mdDatepickerToggle]="picker"></button> | ||
<md-datepicker-toggle mdSuffix [for]="picker"></md-datepicker-toggle> | ||
</md-input-container> | ||
<md-datepicker #picker></md-datepicker> |
2 changes: 1 addition & 1 deletion
2
src/material-examples/datepicker-start-view/datepicker-start-view-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<md-input-container> | ||
<input mdInput [mdDatepicker]="picker" placeholder="Choose a date"> | ||
<button mdSuffix [mdDatepickerToggle]="picker"></button> | ||
<md-datepicker-toggle mdSuffix [for]="picker"></md-datepicker-toggle> | ||
</md-input-container> | ||
<md-datepicker #picker startView="year" [startAt]="startDate"></md-datepicker> |
2 changes: 1 addition & 1 deletion
2
src/material-examples/datepicker-touch/datepicker-touch-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<md-input-container class="example-full-width"> | ||
<input mdInput [mdDatepicker]="picker" placeholder="Choose a date"> | ||
<button mdSuffix [mdDatepickerToggle]="picker"></button> | ||
<md-datepicker-toggle mdSuffix [for]="picker"></md-datepicker-toggle> | ||
</md-input-container> | ||
<md-datepicker touchUi="true" #picker></md-datepicker> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4255476
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change breaks NoConflictStyleCompatibilityMode due to https://github.com/angular/material2/blob/42554763c86acb66822a507bc5e2516cc81b907a/src/lib/datepicker/datepicker-toggle.html#L1