Ionic 2 Bug? Time Picker can't show midnight?

Whenever I open a time that is set to midnight (12:00AM), it seems that the time picker switches to 1:00AM instead. Can anyone else confirm they can reproduce this issue? Is it a bug in Ionic?

To reproduce, make an ion-datetime showing time in the HTML

<ion-datetime displayFormat="h:mm A" pickerFormat="h mm A" [(ngModel)]="startDate"></ion-datetime>

bind it to a variable in the TS:

startDate: String = new Date().toISOString();

Then run it, and select midnight as the time then, and then immediately tap the field again to edit the time, and when the time picker opens it up shows 1AM instead of midnight.


1 Like

Attaching a screenshot of the issue happening, with the ion-datetime component above, and the time picker below:


I’ve opened an issue in the GitHub repo for this:

1 Like