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

Md-datepicker touchUi is always treated as if touchUi is set to true #6344

Closed
riankol opened this issue Aug 8, 2017 · 5 comments
Closed

Comments

@riankol
Copy link

riankol commented Aug 8, 2017

Bug, feature request, or proposal:

Bug

What is the expected behavior?

when touchUi="true" the md-datepicker will be opened in touchscreen mode, but when touchUi="false", md-datepicker will be opened as a popup under the input

What is the current behavior?

even when touchUi="false" md-datepicker opens in touchscreen mode

What are the steps to reproduce?

Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: http://plnkr.co/edit/XcGBezjJ27qYTRdvQt0v?p=preview (I changed an existing plunker with md-datepicker I found and added the touchUi="false".)

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

I want to be able use a boolean 'showInTouchMode' like this: [touchUi]="showInTouchMode".

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

I use in my package.json among others:
"@angular/common": "4.3.1",
"@angular/cdk": "2.0.0-beta.8",
"@angular/material": "2.0.0-beta.8",
"typescript": "2.4.1"

Is there anything else we should know?

Not about this point, but I would really appreciate more examples in the documentation at material.angular.io. How exactly should I customize md-datepicker with the parse and display formats? And How exactly should I localize labels and messages? For example, how should a 'MY_DATE_FORMATS' file look?

@willshowell
Copy link
Contributor

Remember the brackets

@rafaelss95
Copy link
Contributor

rafaelss95 commented Aug 8, 2017

@willshowell Although you're correct, I'm just curious as why only this specific @Input doesn't have a getter and setter (calling coerceBooleanProperty method).

@riankol
Copy link
Author

riankol commented Aug 8, 2017

Thanks! It works indeed with the brackets!

@riankol riankol closed this as completed Aug 8, 2017
@willshowell
Copy link
Contributor

@rafaelss95 Fair question - maybe raise a separate issue about that be included in a library-wide audit? IMO coerceBooleanProperty teaches bad habits, but I'm sure there is a valid reason behind it

@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
None yet
Projects
None yet
Development

No branches or pull requests

3 participants