ionic-team / ionic-team/ionic-framework

bug: Datetime selected day should not change when changing months or years in the wheel picker

Đang mở
#29,008 3 bình luận 2 reaction 0 người được giao Xem trên GitHub
package: core type: bug
Ngôn ngữ chính
TypeScript
Star
52.7k
Fork
13.3k
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
51

Mô tả

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

v7.x

### Current Behavior

Datetime currently has a confusing user experience where changing either the month or year through the wheel picker interface:

![CleanShot 2024-02-09 at 14 48 49](https://github.com/ionic-team/ionic-framework/assets/13732623/e4a15276-ad3e-4842-bf79-38d0de2c714b)

![CleanShot 2024-02-09 at 14 49 24](https://github.com/ionic-team/ionic-framework/assets/13732623/83b990ca-1655-4474-8fe1-c1426cbbee8c)

Results in the selected day applying in the working month:

![CleanShot 2024-02-09 at 14 49 46](https://github.com/ionic-team/ionic-framework/assets/13732623/60b5ef25-2e13-4bdf-93e9-0319a7915940)

In experiences with multiple selection (as shown) this is even more confusing, as it only applies the first selected day to the new working month/year.

### Expected Behavior

Ionic should not be doing this behavior at all. Changing the month or year should have no impact on the selections within the calendar grid.

For example, if you change the month through the arrow navigation:

![CleanShot 2024-02-09 at 14 51 11](https://github.com/ionic-team/ionic-framework/assets/13732623/420edd08-a351-480c-bc61-5b203fbb6149)

This behavior does not occur. This is expected.

### Steps to Reproduce

1. Render a datetime and select a day
2. Change the month or year from the picker interface (clicking the button in the upper-left of the header)
3. Observe: The selected day is applied to the new month/year you are viewing.

### Code Reproduction URL

https://ionicframework.com/docs/api/datetime#multiple-date-selection

### Ionic Info

N/A

### Additional Information

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.