Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datepicker - Firefox displaying red box-shadow when "required" attribute added to matEndDate input #20483

Closed
olsonjj opened this issue Sep 2, 2020 · 1 comment · Fixed by #20489
Assignees
Labels
area: material/datepicker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@olsonjj
Copy link

olsonjj commented Sep 2, 2020

Reproduction

Use StackBlitz to reproduce your issue:
https://stackblitz.com/edit/angular-gp6jmx?file=src%2Fapp%2Fdate-range-picker-forms-example.html

Steps to reproduce:

  1. Add mat-date-range-input
  2. Add required attribute to the matEndDate input
  3. View in Firefox. When no dates have been selected, a red border appears on the end date input.

`
Enter a date range
<mat-date-range-input [formGroup]="range" [rangePicker]="picker" >



<mat-datepicker-toggle matSuffix [for]="picker">
<mat-date-range-picker #picker>

<mat-error *ngIf="range.controls.start.hasError('matStartDateInvalid')">Invalid start date
<mat-error *ngIf="range.controls.end.hasError('matEndDateInvalid')">Invalid end date

`

Expected Behavior

Shouldn't be able to see the input border.

image

Actual Behavior

In Firefox, can see the red required box shadow until

image

Environment

  • Angular: 10.1.0
  • CDK/Material: 10.1.2
  • Browser(s): Firefox 79, Firefox 80
  • Operating System: MacOs and Windows.
@olsonjj olsonjj added the needs triage This issue needs to be triaged by the team label Sep 2, 2020
@crisbeto crisbeto self-assigned this Sep 2, 2020
@crisbeto crisbeto added area: material/datepicker has pr P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed needs triage This issue needs to be triaged by the team labels Sep 3, 2020
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 3, 2020
Firefox automatically adds a red `box-shadow` to invalid inputs. These changes remove it from the inner range inputs since their invalid state is shown through the `mat-form-field`.

Fixes angular#20483.
wagnermaciel pushed a commit that referenced this issue Sep 16, 2020
…ox (#20489)

Firefox automatically adds a red `box-shadow` to invalid inputs. These changes remove it from the inner range inputs since their invalid state is shown through the `mat-form-field`.

Fixes #20483.
wagnermaciel pushed a commit that referenced this issue Sep 16, 2020
…ox (#20489)

Firefox automatically adds a red `box-shadow` to invalid inputs. These changes remove it from the inner range inputs since their invalid state is shown through the `mat-form-field`.

Fixes #20483.

(cherry picked from commit 50eca15)
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 17, 2020
wagnermaciel pushed a commit to wagnermaciel/components that referenced this issue Jan 14, 2021
…ox (angular#20489)

Firefox automatically adds a red `box-shadow` to invalid inputs. These changes remove it from the inner range inputs since their invalid state is shown through the `mat-form-field`.

Fixes angular#20483.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/datepicker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants