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

Add ability to disable datepicker pop-up #5017

Closed
dimabutenko opened this issue Jun 7, 2017 · 2 comments · Fixed by #5305
Closed

Add ability to disable datepicker pop-up #5017

dimabutenko opened this issue Jun 7, 2017 · 2 comments · Fixed by #5305
Assignees
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@dimabutenko
Copy link

Bug, feature request, or proposal:

Bug
I have a component with template like this:

<md-input-container [formGroup]="formGroup">
   <input mdInput [mdDatepicker]="datepicker" [formControlName]="control.name" [readOnly]="control.isReadonly">
   <button *ngIf="!control.isReadonly" mdSuffix [mdDatepickerToggle]="datepicker"></button>
</md-input-container>
<md-datepicker *ngIf="!control.isReadonly" #datepicker></md-datepicker>

What is the expected behavior?

I want to not to render md-datepicker, so i added *ngIf="!control.isReadonly" to md-datepicker.

What is the current behavior?

When control.isReadonly is false, md-datepicker is not rendered
(I mean that there is no HTML for md-datepicker)

@jelbourn jelbourn changed the title *ngIf in md-datepicker not working Add ability to disable datepicker pop-up Jun 8, 2017
@jelbourn jelbourn added feature This issue represents a new feature or feature request rather than a bug or bug fix P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels Jun 8, 2017
@jelbourn
Copy link
Member

jelbourn commented Jun 8, 2017

It's expected that this wouldn't work, since the component pulls the content of <md-datepicker> out of place and shows it in the floating panel. However, there should be a way to have this behavior.

@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
feature This issue represents a new feature or feature request rather than a bug or bug fix P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants