components icon indicating copy to clipboard operation
components copied to clipboard

Delete input from md-datepicker

Open Leonzen opened this issue 9 years ago • 3 comments

Bug, feature request, or proposal:

Request

What is the expected behavior?

When a date is chosen with the md-datepicker, a button should appear which can delete the value of the input field.

What is the current behavior?

There is no button to delete the input field after a value is set.

What is the use-case or motivation for changing an existing behavior?

It is easier for the user to delete the input with a button instead of deleting it with the keyboard and if the input field is disabled the user is not able to delete is, therefore a button is needed.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular: 4.2.4 Material: 2.0.0-beta.8

Leonzen avatar Jul 12 '17 07:07 Leonzen

@Leonzen, you can achieve it with almost no effort.

Take a look at this plunker: https://plnkr.co/edit/S3tG9z?p=preview

julianobrasil avatar Jul 12 '17 10:07 julianobrasil

As @julianobrasil showed, you can add something like with with the input suffix.

jelbourn avatar Jul 13 '17 02:07 jelbourn

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.