ionic-team / ionic-team/ionic-framework

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

Abierto
#30,184 1 comentario 0 reacciones 0 asignados Ver en GitHub
triage
Lenguaje dominante
TypeScript
Estrellas
52.7k
Forks
13.3k
Merge medio
1 d 15 h
PR fusionados (30 d)
51

Descripción

### 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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.