title: How to combine date and time into a single datetime object?
body: <p>In my react native app i need to combine my date and time in to single datetime object. I used react native modal date time picker npm package for get date and time. </p>
  
  <p>I have a datepicker returning a date string, and a timepicker returning a time string. When i try to combine it will give me a output as Invalid date.</p>
  
  <pre><code>concatDateTime = () =&gt; {
  
      var date = this.state.date;
      var time = this.state.currentTime;
  
      var dateTime = Moment(date + ' ' + time, 'DD/MM/YYYY HH:mm');
  
      console.log(dateTime.format('YYYY-MM-DD HH:mm'));
  }
  </code></pre>
  
  <p>I need dateobject in ('YYYY-MM-DDTHH:mm:s') format.</p>