Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
Ionaru opened this issue Feb 10, 2025 · 1 comment
Open
3 tasks done
Labels

Comments

@Ionaru
Copy link

Ionaru commented Feb 10, 2025

Prerequisites

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

Expected Behavior

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

Steps to Reproduce

  1. Use this template code
<ion-datetime-button datetime="datetime" />
<ion-modal [keepContentsMounted]="true">
  <ng-template>
    <ion-datetime
      id="datetime"
      minuteValues="0"
      [showDefaultButtons]="true"
    />
  </ng-template>
</ion-modal>
  1. Make sure the current time is not a valid value
  2. Open the time picker
  3. Click "done"
  4. 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\<NAME>\AppData\Local\nvs\node\22.12.0\x64\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 8.4.2 (C:\Users\<NAME>\Projects\<PROJECT>\node_modules\@ionic\angular)
   @angular-devkit/build-angular : 19.1.4 (C:\Users\<NAME>\Projects\<PROJECT>\node_modules\@angular-devkit\build-angular)
   @angular-devkit/schematics    : 19.1.4 (C:\Users\<NAME>\Projects\<PROJECT>\node_modules\@angular-devkit\schematics)
   @angular/cli                  : 19.1.4 (C:\Users\<NAME>\Projects\<PROJECT>\node_modules\@angular\cli)
   @ionic/angular-toolkit        : 12.1.1 (C:\Users\<NAME>\Projects\<PROJECT>\node_modules\@ionic\angular-toolkit)

Capacitor:

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

Utility:

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

System:

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

Additional Information

Related to #30183

@ionitron-bot ionitron-bot bot added the triage label Feb 10, 2025
@Whyceely
Copy link

That’s nice,can you hit me up please it still me whycee I’m searching for a sponsor to help me in been an expert hacker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants