She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

Android vs iOS listview problem

Hi Team,

This is the first time that we've tested the app that we are created in iOS,.
now this is weird and i dont know how to fix it.: in iOS the list is undefined but in android the date was displayed. i hope you can help me here screenshot is in below:
iOS ScreenShot:

https://d2r1vs3d9006ap.cloudfront.net...

Android ScreenShot:

https://d2r1vs3d9006ap.cloudfront.net...

Mapping Screenshot:
https://d2r1vs3d9006ap.cloudfront.net...

code
var stringDate = value;
var d = new Date(stringDate);
console.log(d.toLocaleDateString());
var weekday = new Array(7);
weekday[0]= "(Sun)&quot
weekday[1] = "(Mon)&quot
weekday[2] = "(Tue)&quot
weekday[3] = "(Wed)&quot
weekday[4] = "(Thu)&quot
weekday[5] = "(Fri)&quot
weekday[6] = "(Sat)&quot
var mmonth = new Array(12);
mmonth[1] = "Jan.&quot
mmonth[2] = "Feb.&quot
mmonth[3] = "Mar.&quot
mmonth[4] = "Apr.&quot
mmonth[5] = "May&quot
mmonth[6] = "Jun.&quot
mmonth[7] = "Jul.&quot
mmonth[8] = "Aug.&quot
mmonth[9] = "Sep.&quot
mmonth[10] = "Oct.&quot
mmonth[11] = "Nov.&quot
mmonth[12] = "Dec.&quot
return mmonth[d.getMonth()+1] + " " + d.getDate() + ","+ " " + d.getFullYear() + " " + weekday[d.getDay()];
/code

Thank you,

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Android vs iOS listview problem

Hello,

You can use moment.js (http://momentjs.com/docs/) for viewing date and time in any format.

She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

Android vs iOS listview problem

Hi Sergiy,
can you explain me how that happen in ios? if that code is working in android, why in iOS is not working?

thanks,

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Android vs iOS listview problem

Platform differs, there should be different solution for iOS. Please search online for best practice.

She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

Android vs iOS listview problem

Hi Alena,
i Already fixed this problem last week, by removing the Time into the date format and use the code above.,

Thanks,

Return to “Issues”