Skip to content

feat(timepicker): Allow mat-timepicker to work with other controls different than input[matTimepicker] #31336

Open
@robmv

Description

@robmv

Feature Description

I have a custom time input component that is a wrapper for two input fields and a button (for AM/PM or the localized version of those):

Image

This custom component can't be currently integrated with <mat-timepicker> because it explicitly requires a MatTimepickerInput. <mat-timepicker> could instead requires an common interface that any control must implement in order to be able to interact with the picker.

Internally this is already happening for MatTimepickerInput because it implements a getOverlayOrigin() method in order to satisfy the picker requirements. This could be extended to other methods and allow other controls to integrate with the picker.

Use Case

Be able to use <mat-timepicker> without an input[matTimepicker] but with other custom controls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis issue represents a new feature or feature request rather than a bug or bug fixneeds 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