Skip to content

bug(COMPONENT): Datepicker huge visual change with little code of angular v17 #28182

@andrei-agdo

Description

@andrei-agdo

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Hello folks!

In my personal studies and updates, a specific update of my component broke the datepicker with a simple update, the new template control flow of Angular v17. It's simple but strange
Is so simple that can be simulate with a basic tutorial.

Normal tutorial:
image

Little and no logic update
image

Just the "@ if(true)" broken all visual of datepicker.

I know I can just "don't do the if inside mat-form-field" etc, but I think is a too simple code to broken too much, and theoretically the angular's control flow can't broke the css

Reproduction

StackBlitz link: https://stackblitz.com/edit/ncg3w3?file=src%2Fexample%2Fdatepicker-overview-example.html

Expected Behavior

Don't broke the css with @ if directives

Actual Behavior

When I put a control flow inside mat-form-field the css be broke

Environment

  • Angular: v17
  • CDK/Material: v17
  • Browser(s): Chrome, Edge
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions