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: ion-datetime can't set current time with confirm() method #26338

Closed
4 of 7 tasks
dragermrb opened this issue Nov 22, 2022 · 2 comments
Closed
4 of 7 tasks

bug: ion-datetime can't set current time with confirm() method #26338

dragermrb opened this issue Nov 22, 2022 · 2 comments
Labels

Comments

@dragermrb
Copy link

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

ion-datetime doesn't allow to confirm current time without change any values (hours or minutes).

If you have one variable with null value assigned to ion-datetime ngModel, when you try to confirm the time, variable doesn't get updated.

Expected Behavior

Allow to select and confirm current time.

Steps to Reproduce

<ion-datetime #datetime presentation="time" [(ngModel)]="myDate">
  <ion-buttons slot="buttons">
    <ion-button color="danger" (click)="datetime.reset()">Reset</ion-button>
    <ion-button color="primary" (click)="datetime.cancel()"
      >Never mind</ion-button
    >
    <ion-button color="primary" (click)="datetime.confirm()"
      >All Set</ion-button
    >
  </ion-buttons>
</ion-datetime>

<!-- myDate = null initially -->
<p>My Date: _{{ myDate }}_</p>
  • Visit code reproduction url: Demo
  • Click on All set. Variable is not updated.
  • Click on current time and click on All set. Variable is not updated.
  • Click on another time and click on All set. Variable is updated.
  • You can change to another time and back to current time and then variable is updated.

Code Reproduction URL

https://stackblitz.com/edit/angular-uba3ym?file=src/app/example.component.html

Ionic Info

Ionic:

   Ionic CLI                     : 6.16.3 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.3.4
   @angular-devkit/build-angular : 13.2.6
   @angular-devkit/schematics    : 13.2.6
   @angular/cli                  : 13.2.6
   @ionic/angular-toolkit        : 6.1.0

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Nov 22, 2022
@liamdebeasi
Copy link
Contributor

Thanks for the report. This appears to be another instance of #25839, so I am going to merge the two threads. The problem here is the wheel picker does not auto-select the first item (even though it is visually selected).

@liamdebeasi liamdebeasi closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2022
@ionitron-bot
Copy link

ionitron-bot bot commented Dec 22, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Dec 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants