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

bug(Datepicker): opened @Input doesn't work well with strictTemplates #20249

Closed
rafaelss95 opened this issue Aug 9, 2020 · 1 comment · Fixed by #20250
Closed

bug(Datepicker): opened @Input doesn't work well with strictTemplates #20249

rafaelss95 opened this issue Aug 9, 2020 · 1 comment · Fixed by #20250
Labels
area: material/datepicker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@rafaelss95
Copy link
Contributor

Reproduction

https://stackblitz.com/edit/components-issue-f5gvy1

Steps to reproduce:

  1. Try to pass null | undefined | '' to opened;
  2. Type 'boolean | null' is not assignable to type 'boolean'.
    Type 'null' is not assignable to type 'boolean'.

Expected Behavior

Accept null | undefined | '' as disabled and touchUi.

Actual Behavior

You can't use <mat-datepicker opened> or <mat-datepicker [opened]="opened$ | async" with strictTemplates enabled.

Environment

Angular CLI: 10.0.5
Node: 13.7.0
OS: darwin x64

Angular: 10.0.8
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.1000.5
@angular-devkit/build-angular 0.1000.5
@angular-devkit/build-optimizer 0.1000.5
@angular-devkit/build-webpack 0.1000.5
@angular-devkit/core 10.0.5
@angular-devkit/schematics 10.0.5
@angular/cdk 10.1.2
@angular/cli 10.0.5
@angular/flex-layout 10.0.0-beta.32
@angular/material 10.1.2
@ngtools/webpack 10.0.5
@schematics/angular 10.0.5
@schematics/update 0.1000.5
rxjs 6.6.2
typescript 3.9.7
webpack 4.43.0

@rafaelss95 rafaelss95 added the needs triage This issue needs to be triaged by the team label Aug 9, 2020
@crisbeto crisbeto added area: material/datepicker has pr P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed needs triage This issue needs to be triaged by the team labels Aug 9, 2020
@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 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/datepicker 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.

2 participants