Page 1 of 1

Android vs iOS listview problem

Posted: Wed May 20, 2015 3:07 am
by She

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,


Android vs iOS listview problem

Posted: Wed May 20, 2015 2:15 pm
by Serhii Kulibaba

Hello,

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


Android vs iOS listview problem

Posted: Sun May 24, 2015 11:41 pm
by She

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,


Android vs iOS listview problem

Posted: Wed May 27, 2015 8:48 pm
by Alena Prykhodko

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


Android vs iOS listview problem

Posted: Thu May 28, 2015 12:37 am
by She

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

Thanks,