ionic-team / ionic-team/ionic-framework

bug: Unable to choose preselected time through ion-datetime-button using minuteValue

Đang mở
#30,184 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
triage
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/docs/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

v8.x

### Current Behavior

When using `minuteValue` for `ion-datetime` and the current time does not match a valid time according to the `minuteValue`, the preselected time when opening the `ion-datetime` modal, does not emit a value. And the `ion-datetime-button` keeps showing the current (invalid) time.

Only by changing the time to something else, and then changing it back, will it emit the chosen value.

![Image](https://github.com/user-attachments/assets/5864037e-7031-452b-acc8-09fbe0fb3669)

### Expected Behavior

I should be able to select the time the time picker has preselected.

### Steps to Reproduce

1. Use this template code

```html



```

2. Make sure the current time is not a valid value
3. Open the time picker
4. Click "done"
5. No value was selected or emitted, the time picker still shows the original time.

### Code Reproduction URL

https://stackblitz.com/edit/sgkfctaz-ahbwunyn?file=src%2Fapp%2Fexample.component.html

### Ionic Info

```
Ionic:

Ionic CLI : 7.2.0 (C:\Users\\AppData\Local\nvs\node\22.12.0\x64\node_modules\@ionic\cli)
Ionic Framework : @ionic/angular 8.4.2 (C:\Users\\Projects\\node_modules\@ionic\angular)
@angular-devkit/build-angular : 19.1.4 (C:\Users\\Projects\\node_modules\@angular-devkit\build-angular)
@angular-devkit/schematics : 19.1.4 (C:\Users\\Projects\\node_modules\@angular-devkit\schematics)
@angular/cli : 19.1.4 (C:\Users\\Projects\\node_modules\@angular\cli)
@ionic/angular-toolkit : 12.1.1 (C:\Users\\Projects\\node_modules\@ionic\angular-toolkit)

Capacitor:

Capacitor CLI : not installed
@capacitor/android : 6.2.0 (C:\Users\\Projects\\node_modules\@capacitor\android)
@capacitor/core : 6.2.0 (C:\Users\\Projects\\node_modules\@capacitor\core)
@capacitor/ios : 6.2.0 (C:\Users\\Projects\\node_modules\@capacitor\ios)

Utility:

cordova-res : not installed globally
native-run : not installed globally

System:

NodeJS : v22.12.0 (C:\Users\\AppData\Local\nvs\default\node.exe)
npm : 11.1.0
OS : Windows 10
```

### Additional Information

Related to https://github.com/ionic-team/ionic-framework/issues/30183

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.