bug(datepicker): monthSelected doesn't actually update formControl if calendar view closed before picking a date in the month
- 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
When opening a 'monthView' and closing a calendar in monthSelected event, pre-setting formControl value, its actually not changed. Its visible from the example I attached
### Reproduction
StackBlitz link: https://stackblitz.com/edit/c5ckw68f?file=src%2Fexample%2Fdatepicker-views-selection-example.html,src%2Fexample%2Fdatepicker-views-selection-example.ts,src%2Fexample%2Fdatepicker-views-selection-example.css
Steps to reproduce:
1. Select a different month in the calendar
2. Check the output values
### Expected Behavior
formControl value has a selected month
### Actual Behavior
formControl value doesn't change
### Environment
- Angular: 19.1.3
- CDK/Material: 19.1.3
- Browser(s): Chrome (all basically)
- Operating System: Windows
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với bản tái hiện trên StackBlitz, đặc biệt là src/example/datepicker-views-selection-example.html và src/example/datepicker-views-selection-example.ts, rồi tái hiện luồng monthView bằng cách đóng lịch từ sự kiện monthSelected. Theo dõi đường dẫn cập nhật form-control của datepicker và xác minh rằng việc chọn một tháng vẫn để formControl chứa tháng đã chọn sau khi lịch đóng.
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