Skip to content

bug(mat-date-range-picker): Unable to pick a date when using functions with [min],[max] #19907

@stnor

Description

@stnor

Reproduction

https://stackblitz.com/edit/mat-date-range-fn-bug

Steps to reproduce:

  1. Pick a date using the first date picker ([min], [max] bound with member variable) - works as expected
  2. Pick a date using the second date picker ([min], [max] bound with function) - UNABLE TO PICK A DATE RANGE.

Expected Behavior

I am expecting that the date-range-picker can be set with dynamic mutable min and max values.

Actual Behavior

You are unable to use the picker when [min] or [max] or both is bound to a function that returns new Date or Moment objects every time.

Environment

  • Angular: 10.0.2
  • CDK/Material: 10.0.1
  • Browser(s): Chrome and Safari
  • Operating System: macOS

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaroundarea: material/datepicker

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions