Skip to content

Commit

Permalink
feat(md-datepicker): add icon fixup for datepicker, #340
Browse files Browse the repository at this point in the history
  • Loading branch information
Thanood committed Dec 22, 2016
1 parent bc2b581 commit 1e767c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/colors/md-colors.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@
.picker__footer button:focus {
background-color: ${mdAccentColor | lighten:2};
}
[md-datepicker] + i.material-icons.std-icon-fixup {
margin-left: -24px;
line-height: 1;
margin-top: 12px;
cursor: pointer;
}

/* text input */
md-input .input-field label {
Expand Down
3 changes: 3 additions & 0 deletions src/datepicker/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ export class MdDatePicker {
calendarIcon.textContent = 'today';
this.element.parentNode.insertBefore(calendarIcon, this.element.nextSibling);
$(calendarIcon).on('click', this.onCalendarIconClick.bind(this));

options.iconClass = options.iconClass || 'std-icon-fixup';
calendarIcon.classList.add(options.iconClass);
}

this.movePickerCloserToSrc();
Expand Down

0 comments on commit 1e767c9

Please sign in to comment.