ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

<ion-datetime> not working in Android 4.x

Open hotforfeature opened this issue 10 years ago • 7 comments

Short description of the problem:

Picker API does not work in Android 4.x, since Chrome does not support the transform property without a -webkit prefix.

Steps to reproduce:

  1. Use an <ion-datetime> on a KitKat device
  2. Try not to cry.
  3. Cry a lot.

Which Ionic Version? 1.x or 2.x 2.0.0-beta.10

Plunker that shows an example of your issue

http://plnkr.co/edit/fULJIdd2irgBszzQxZet?p=preview

Note that it works fine in a modern browser. You'll need to test it on a browser that does not support the transform property. Here's a screenshot on a 4.4 Android device: screenshot_2016-07-27-16-33-49

Run ionic info from terminal/cmd prompt: (paste output below) Cordova CLI: 6.2.0 Gulp version: CLI version 3.9.1 Gulp local: Local version 3.9.1 Ionic Framework Version: 2.0.0-beta.10 Ionic CLI Version: 2.0.0-beta.32 Ionic App Lib Version: 2.0.0-beta.18 ios-deploy version: 1.8.6 ios-sim version: Not installed OS: Mac OS X El Capitan Node Version: v5.11.0 Xcode version: Xcode 7.3.1 Build version 7D1014

hotforfeature avatar Jul 27 '16 21:07 hotforfeature

Here is the button's code in picker-component.ts that is applying the transform

<button *ngFor="let o of col.options; let i=index" [style.transform]="o._trans" [style.transitionDuration]="o._dur" [style.webkitTransform]="o._trans" [style.webkitTransitionDuration]="o._dur" [class.picker-opt-selected]="col.selectedIndex === i" [class.picker-opt-disabled]="o.disabled" (click)="optClick($event, i)" type="button" category="picker-opt">
  {{o.text}}
</button>

I did a quick search, and it's the only time [style.webkitXXX] is being used in the repo. In the latest version of Chrome, I don't see a -webkit-transform style, I wonder if the style binding can be used for vendor prefixes?

hotforfeature avatar Jul 27 '16 21:07 hotforfeature

Hello all! Thanks for opening an issue with us! This has already been fixed and will be in the upcoming beta.11 release. Thanks for using Ionic!

jgw96 avatar Jul 28 '16 15:07 jgw96

Still happening to me with Ionic beta 11.

Gulp version: CLI version 3.9.1 Gulp local: Local version 3.9.1 Ionic Framework Version: 2.0.0-beta.11 Ionic CLI Version: 2.0.0-beta.37 Ionic App Lib Version: 2.0.0-beta.20 OS: Windows 7 SP1 Node Version: v6.3.1

The issue is the exact same than the original post.

PabloFNK avatar Sep 15 '16 11:09 PabloFNK

Its still happens with Ionic RC1, Android 6.0.x

vnheros avatar Oct 26 '16 12:10 vnheros

did anyone figure out how to use the ion-datetime tag ?

<ion-item> <ion-label>Date</ion-label> <ion-datetime displayFormat="MM/DD/YYYY" [(ngModel)]="currentUser.information.dob.iso"></ion-datetime> </ion-item>

here currentUser.information.dob.iso is a string format date "2016-11-24T01:37:09.592Z"

I have also tried with date objects but am unable to use the ion-datetime in my ionic app. I dont even see the date time picker as shown in the API documentation here

https://ionicframework.com/docs/v2/api/components/datetime/DateTime/

Do we have to do some plugin install before we can use ion-datetime ? please help.

In the mean while I'm using the html5 date input

Thanks in advance

tanzeelrana avatar Nov 24 '16 01:11 tanzeelrana

I still having the same issue in my app with the ion-datetime tag. The thing is that a couple of days ago it was working perfectly but now its break. @jgw96

miguelonga avatar Dec 14 '16 09:12 miguelonga

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[bot] avatar Sep 05 '18 19:09 ionitron-bot[bot]