Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

datepicker: cannot set autocomplete property in generated input tag #11851

Open
@TheManuz

Description

@TheManuz

Bug

Detailed Reproduction Steps:

  1. Create an md-datepicker, nested inside an md-input-container, nested inside a form.
  2. Assign a name property to md-datepicker ("releaseDate" and "expirationDate" in my case)
  3. Have Chrome autofill enabled with autocomplete fields available (specifically "email" in my case)

What is the expected behavior?

Autofill should not try to populate a datepicker.

md-datepicker should have an attribute like md-input-autocomplete that should set the "autocomplete" attribute and value in the generated input tag.
An alternative could be to disable autocomplete behaviors entirely (not sure how).

What is the current behavior?

Chrome will suggest to autofill the md-input generated by the md-datepicker with an email (in my case, but this may vary).

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

If a user wants to autofill other fields of the form, the datepicker will be populated with wrong data.

Which versions of AngularJS, Material, OS, and browsers are affected?

  • AngularJS: 1.7.9
  • AngularJS Material: 1.1.12
  • OS: Mac OS High Sierra 10.13.6
  • Browsers: Chrome

Is there anything else we should know? Stack Traces, Screenshots, etc.

Nothing relevant

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4: minorMinor issues. May not be fixed without community contributions.type: enhancement

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions