You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I provide values for the min and max values, the date and time picker does not show up on iOS. The same typescript code works perfectly well on Android.
To Reproduce
Steps to reproduce the behavior:
On iOS, tap the "Select Date and Time" button
The following "Failed to parse date" error shows up
Expected behavior
The date picker should open instead, honoring the min and max dates provided upon instantiation.
Smartphone (please complete the following information):
Device: iPhone X
OS: iOS 14.4.2
Additional context
// Note that minDate is shown in the template itselfgetminDate(): string {returnDateTime.now().plus({hours: 2}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");}getmaxDate(): string {returnDateTime.now().plus({days: 6}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");}
...
asyncshowPicker(){constDatePicker: DatePickerPluginInterface=Plugins.DatePickerPluginasany;constoptions={min: this.minDate,max: this.maxDate,};DatePicker.present(options).then((date)=>(this.currentArrivalDateTime=date.value),(err)=>alert(err));}
{{ minDate }}
<h5class="px-3 pt-3 header-text">Preferred Arrival Time</h5><ion-itemlines="none" (click)="changeArrivalTime()"><divtabindex="0"></div><ion-iconsize="small"
class="ml-2"
name="time-outline"
slot="start"
></ion-icon><smallclass="DeliveryDetail__text py-3 w-100"><ng-container*ngIf="currentArrivalDateTime; else arrivalTimeLabel">
{{ currentArrivalDateTime | date: "EEE - MMM d (h:mm a)" }}
</ng-container></small><smallslot="end" class="font-weight-bold"> Change </small></ion-item><ng-template#arrivalTimeLabel> Select Time and Date </ng-template>
The same exact code works on Android. See screenshots below.
The text was updated successfully, but these errors were encountered:
//opts['max'] = moment(evdt).toISOString();
changed to:
opts['max'] = moment(evdt).format("YYYY-MM-DDTHH:mm");
and then it worked ok. So Android was perhaps being less picky when an ISO date string was passed into the parse routine, that didn't match the format set.
Also, I thought that the default format should have ss.SSS (ss being seconds and SSS being microsecs)
Describe the bug
When I provide values for the min and max values, the date and time picker does not show up on iOS. The same typescript code works perfectly well on Android.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The date picker should open instead, honoring the min and max dates provided upon instantiation.
Smartphone (please complete the following information):
Additional context
The same exact code works on Android. See screenshots below.
The text was updated successfully, but these errors were encountered: