Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70752

Black screen on iPhone on tabspage

$
0
0

@JackyVip wrote:

On the first tab, I want to display the difference between Date in minutes. I can run the app on browser and android but on ios, I get a black screen.

If I don’t change the Date format I get NaN on the iPhone .

GetTime(date)
{
   let today = new Date();
   today = ConvertDateForIOS(today.toString());
   let someDay = new Date(date);
  someDay =  ConvertDateForIOS(someday.toString());

   let difDate = +someDay - +today;
  return Math.abs(Math.round(((diffDate % 86400000)%3600000)/60000));
}

ConvertDateForIOS(date)
{
    let arr = date.split(/[- : T]/);
   date = new Date(parseInt(arr[0]),parseInt(arr[1]),parseInt(arr[2]),parseInt(arr[3]),parseInt(arr[4]),parseInt(arr[5]));
    return date;
}

If I comment my code and rebuild the app, I can run the app on iphone.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70752

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>