title: momentjs for only time value
body: <p>I use momentjs to work with date and time</p>
  
  <pre><code>let dateAndTime = moment(component.props.data.value, moment.ISO_8601);
  let date = '',
    time = '';
  if (dateAndTime) {
    if (moment(dateAndTime, 'YYYY-MM-DD', true).isValid()) {
      date = moment(dateAndTime).format('YYYY-MM-DD');
    }
  
    if (moment(dateAndTime, 'HH:mm', true).isValid()) {
      time = moment(dateAndTime).format('HH:mm');
    }
  }
  </code></pre>
  
  <p>this code works just fine if <code>component.props.data.value</code> contains date and time like <code>2018-05-22 14:45</code> or if it contains only date like <code>2018-05-22</code>. The problem is sometimes <code>component.props.data.value</code> contains only time like <code>14:45</code>, so <code>moment(component.props.data.value, moment.ISO_8601)</code> doesn't create moment object and code below doesn't execute. Is there any way to handle case only for time?</p>