Skip to content

bug(mat-timepicker): Disabling TimePicker does not prevent dropdown from opening #30162

Closed
@kanehjeong

Description

@kanehjeong

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 disabling a mat timepicker input field as well as the timepicker toggle, clicking the toggle or time value on the field still triggers the select dropdown for the times.

Reproduction

Stackblitz Link

Made the following changes off this material example link

// timepicker-forms-example.ts
new FormControl({ value: initialValue, disabled: true }); // Added disabled here

// timepicker-forms-example.html
<mat-timepicker-toggle matIconSuffix [for]="picker" [disabled]="true"/> <!-- Added disabled here -->

Steps to reproduce:

  1. Click the time value of the disabled input or the toggle icon
  2. Notice the select menu pop up with the time selections despite input being disabled

Expected Behavior

Should not open timepicker menu when input and toggle are both disabled

Actual Behavior

Timepicker select menu opens

Environment

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

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