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

bug(MatDateRangePicker): Dates set in illogical order and more than necessary #21847

Closed
mcalmus opened this issue Feb 9, 2021 · 2 comments
Closed
Assignees
Labels
area: material/datepicker P5 The team acknowledges the request but does not plan to address it, it remains open for discussion

Comments

@mcalmus
Copy link
Contributor

mcalmus commented Feb 9, 2021

Reproduction

https://stackblitz.com/edit/components-issue-uosggb?file=src%2Fapp%2Fexample-component.html

Steps to reproduce:

  1. Open Date Picker
  2. Choose beginning date
  3. Choose ending date
    4-6. Repeat steps 1-3

Expected Behavior

Steps 3,6: End date set, beginning date not set
Step 5: End date cleared, beginning date set

Actual Behavior

Steps 3,6: Both beginning date and end date set
Step 5: Beginning date set before end date is cleared

The behavior in steps 3 and 6 causes extra calls that are unnecessary and makes an app check for "changes" that do not modify the value before performing extra operations.
The behavior in step 5 makes the control briefly have a date range that is different than it actually does. In the case where some action is performed when both values are set, it appears they are both set when actually only the start date is set.

Environment

  • Angular: 11
  • CDK/Material: 11
  • Browser(s): all
  • Operating System (e.g. Windows, macOS, Ubuntu): all
@mcalmus mcalmus added the needs triage This issue needs to be triaged by the team label Feb 9, 2021
@crisbeto crisbeto added area: material/datepicker P5 The team acknowledges the request but does not plan to address it, it remains open for discussion and removed needs triage This issue needs to be triaged by the team labels Feb 15, 2021
@zarend zarend self-assigned this Jun 30, 2022
@zarend
Copy link
Contributor

zarend commented Jun 30, 2022

Looks like this was resolved in the above PRs.

@zarend zarend closed this as completed Jun 30, 2022
@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 Jul 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/datepicker P5 The team acknowledges the request but does not plan to address it, it remains open for discussion
Projects
None yet
Development

No branches or pull requests

3 participants