bug(mat-datepicker): calendar with startAt attribute will not update on manual input
- Ngôn ngữ chính
- TypeScript
- Star
- 25k
- Fork
- 6.8k
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 91
Mô tả
### Is this a regression?
- [ ] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
_No response_
### Description
I built a mat-datepicker with startAt property (e.g. 01/01/2024).
Calendar starts as described in documentation at demanded calendar page.
If input value is changed, calendar will not update to desired page. (e.g. date is changed to 05/05/2024, calendar page is still on January 2024 instead of May 2024)
### Reproduction
StackBlitz link: https://stackblitz.com/edit/datepicker-property-error
Steps to reproduce:
1. Change input to any other date (e.g. 5/5/2024) either by typing or selection on calendar.
2. (Re-)Open calendar.
### Expected Behavior
Calendar should switch to page of desired month (e.g. May 2024).
startAt property should only set initial date and react accordingly to changes.
### Actual Behavior
Calendar does not change its page according to the input date. It remains on startAt date.
### Environment
- Angular: v17
- CDK/Material: 17.3.1
- Browser(s): Chrome, Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện hành vi trong StackBlitz được liên kết và kiểm tra entry point của mat-datepicker để xem startAt và việc nhập thủ công ảnh hưởng như thế nào đến tháng được hiển thị. Xác minh việc nhập hoặc chọn một ngày mới, sau đó xác nhận rằng khi mở lại lịch, lịch hiển thị tháng của ngày đã nhập, trong khi startAt chỉ kiểm soát trang ban đầu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, typescript
- Lĩnh vực
- frontend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100