title: How to test a string is valid date or not using moment?
body: <p>I would like to test if a date and or time entered is valid.</p>
  
  <p>Can this be done with moment as date and time testing with javascript seems a nightmare. (have spent hours on this).</p>
  
  <p>Test data looks like this.</p>
  
  <p><strong>Invalid</strong></p>
  
  <pre><code>invalid = ""
  invalid = " "
  invalid = "x"
  invalid = "1/1"
  invalid = "30/2/2015"
  invalid = "2/30/2015"
  </code></pre>
  
  <p><strong>Is Valid</strong></p>
  
  <pre><code>isvalid = "1/12/2015"
  isvalid = "1/12/2015 1:00 PM";
  </code></pre>
  
  <p>Have tried various javascript methods with hours of trials failing.</p>
  
  <p>I thought moment would have something for this. So tried the following, all of which does not work because I do no think moment works like this.</p>
  
  <pre><code>var valid = moment(input).isDate()
  var valid = moment().isDate(input)
  </code></pre>
  
  <p>My time format is "dd/mm/yyyy"</p>