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

DatePipe doesn't work on ios simulator and iPhone 6 plus

Open kamiua opened this issue 10 years ago • 4 comments

I have simple template with {{ someVariableOfDateType | date:'medium' }} or any other DatePipe format parameter. This works fine in chrome but in iOS simulator or on the device the date doesn't show up at all. If I remove filter then date is visible in simulator/device/browser. This also results in some strange behavior of ion-list if I choose to place specified code into ion-item.

Ionic Version: 2.x

kamiua avatar Mar 11 '16 10:03 kamiua

Hello! Thanks for submitting an issue to us! We just need a little more info from you so that we can help your more effectively. Would you mind telling us what version of IOS your experiencing the issue on? Also if you could, can you run ionic info and paste the output here please?

jgw96 avatar Mar 11 '16 17:03 jgw96

Cordova CLI: 6.0.0
Ionic Version: 2.0.0-beta.2
Ionic CLI Version: 2.0.0-beta.19
Ionic App Lib Version: 2.0.0-beta.9
ios-deploy version: 1.8.5 
ios-sim version: 5.0.6 
OS: Mac OS X El Capitan
Node Version: v5.6.0
Xcode version: Xcode 7.3 Build version 7D111g 

iOS version: 9.2.1

I found in [https://github.com/angular/angular/blob/master/modules/angular2/src/common/pipes/date_pipe.ts] that * - this pipe uses the Internationalization API. Therefore it is only reliable in Chrome and Opera Is my guess correct that I have to fallback to using custom filter in my app? As when I use DatePipe not only it doesn't work but rest of the page is not getting rendered...

kamiua avatar Mar 11 '16 18:03 kamiua

Chances are this is the solution https://github.com/driftyco/ionic/issues/5710

alexbainbridge avatar Mar 11 '16 19:03 alexbainbridge

@alexbainbridge agreed, good catch. I will be closing this issue as it is a dupe of #5710. Feel free to continue the discussion on this issue over there! Please feel free to reopen this issue if you feel it is not a duplicate of the other.

jgw96 avatar Mar 11 '16 19:03 jgw96