title: My selected date is showing one day before in Ionic 4
body: <p>I am working in my Ionic 4 app and I have used a native datepicker for that and I am converting the date to <code>toISOString()</code> but the problem is that it is showing one day before.</p>
  
  <p>This is my ts:</p>
  
  <pre><code>this.datePicker.show({
    date: new Date(),
    mode: 'date',
    androidTheme: this.datePicker.ANDROID_THEMES.THEME_HOLO_DARK,
  }).then(
    date =&gt; {
      me.acceptchallengeform.setValue({
        startchallenge: new Date(date).toISOString().split('T')[0], 
      });
      console.log('Got date: ', date)},
    err =&gt; {
      console.log('Error occurred while getting date: ', err)}
  );
  </code></pre>
  
  <p>var DatePickerDate ='Thu Aug 09 2018 00:00:00 GMT+0100 (British Summer Time)';</p>
  
  <p>var myDate = new Date(DatePickerDate).toISOString().split('T')[0];</p>
  
  <p>so myDate is now 2018-08-08</p>
  
  <p>The problem is that it is showing the date one day before.</p>
  
  <p>But I want to show the exact selected date.</p>
  
  <p>Any help is much appreciated.</p>