title: Convert a AM/PM date string to JavaScript date using jQuery
body: <p>I have a date string like this <code>20/09/2018 12:00 AM</code>. I need to stop to put the previous date than today. I have searched the web for it, but no answer found with this format.</p>
  <p>I need the default date format of JavaScript so that I can compare with new Date() value. When I use the following format it show the message that says <code>invalid date</code> because of my <code>dd/MM/yyyy hh:mm tt</code> format.</p>
  <pre><code>alert(new Date(&quot;20/09/2018 12:00 AM&quot;));
  </code></pre>