Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply md-button to datePicker Button #4684

Closed
LilSebastian5000 opened this issue May 19, 2017 · 2 comments · Fixed by #5317
Closed

Apply md-button to datePicker Button #4684

LilSebastian5000 opened this issue May 19, 2017 · 2 comments · Fixed by #5317
Assignees
Labels
P2 The issue is important to a large percentage of users, with a workaround

Comments

@LilSebastian5000
Copy link

LilSebastian5000 commented May 19, 2017

Feature request:

Allow a user to add md-button and md-icon-button on the Date Picker's toggle button:

<button mdSuffix [mdDatepickerToggle]="picker"></button>

What is the expected behavior?

A user should be able to apply material button properties to allow for hover-over and ripple on the calendar button.

What is the current behavior?

Applying both causes the app to crash. Excerpt of the error:

Unhandled Promise rejection: Template parse errors:
More than one component matched on this element.
Make sure that only one component's selector can match a given element.
Conflicting components: MdButton,MdDatepickerToggle

What are the steps to reproduce?

Ex:
<button md-button md-icon-button mdSuffix [mdDatepickerToggle]="picker"></button>

What is the use-case or motivation for changing an existing behavior?

Better usability. A user who notices a hover-over will feel more aware and inclined to use that button.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 4.0.2, Material 2.0.0-beta.5, Windows 7 & 10, TypeScript 2.2.2, Chrome

@mmalerba mmalerba self-assigned this May 19, 2017
@mmalerba mmalerba added the P2 The issue is important to a large percentage of users, with a workaround label May 19, 2017
@mmalerba mmalerba removed the has pr label Jul 11, 2017
@mmalerba
Copy link
Contributor

#5317 is changing the toggle so that it inserts an icon button by default. However if you want to do something other than the default, the toggle is completely optional and its perfectly acceptable to use any element you want as a toggle button. Just hook up it's (click) to picker.close()

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P2 The issue is important to a large percentage of users, with a workaround
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants