Regular expression for date format MM/DD/YYYY returns false results
<p>I have a jquery date picker that pops up everytime I click my textbox(prfm_dtrequest). It returns mm/dd/yyyy format which is the way I want it to be. I need to validate the content of the textbox afterwards to make sure it is in the correct format before loading it into my database when clicking the submit button(#submitform). My code below only returns "is not a valid date" even if I </p>

<pre><code>    &lt;!DOCTYPE html&gt;
    &lt;html lang="en"&gt;
        &lt;head&gt;
            &lt;title&gt;testing&lt;/title&gt;
              &lt;link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"&gt;
              &lt;script src="//code.jquery.com/jquery-1.10.2.js"&gt;&lt;/script&gt;
              &lt;script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"&gt;&lt;/script&gt;
              &lt;link rel="stylesheet" href="/resources/demos/style.css"&gt;
             &lt;script&gt;
              $(function() {
                $( "#prfm_dtrequest" ).datepicker();
              });
            &lt;/script&gt;
            &lt;script&gt;
                $(document).ready(function(){
                $("#submitform").click(function(){
                    var daterequested = $("#prfm_dtrequest").val();
                      var dateMMDDYYYRegex = /^(0[1-9]|1[0-2])\/(0[1-9]|1\d|2\d|3[01])\/(19|20)\d{2}$/ ;
                        if(dateMMDDYYYRegex.test(dateMMDDYYYRegex)){
                           alert('is a valid date: '+daterequested);
                        }else{
                           alert('is not a valid date: '+daterequested);
                        }
                });
            });
            &lt;/script&gt;
        &lt;/head&gt;
        &lt;meta charset="utf-8"&gt;
        &lt;body&gt;
            &lt;form method='post' action=''&gt;
                &lt;input type="date" id="prfm_dtrequest" class='txtfld01' name=''&gt;&lt;input type="submit" id="submitform" value="submit"&gt;
            &lt;/form&gt;
        &lt;/body&gt;
    &lt;/html&gt;
</code></pre>