Skip to content

bug(mat-form-field): no required star displayed after label when using mat-date-range-input #26654

Closed
@alixroyere

Description

@alixroyere

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

When an input is required, a star is put after the label to help the user. There is no such a thing when we use the date range input, so we don't know what is required and this is not homogeneous with the other inputs.
I think the star should be displayed when at least one of the start/end controls is required or when the formgroup is required.

Reproduction

Steps to reproduce:

  1. https://stackblitz.com/edit/angular-gfjwgr-nrqbsl?file=src/app/date-range-picker-comparison-example.html
  2. see that there is no star for required range date label, but there is one for a single date

Expected Behavior

See a star after the label name when values are required for a range date, as for other inputs.

Actual Behavior

No star displayed after the label name when values are required for a range date.

Environment

  • Angular: 15
  • CDK/Material: 15
  • Browser(s): firefox

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/datepicker

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions