 <p>try this (Pure JS Solution)</p> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;p&gt; Date: &lt;input type="date" name="currentDate" id="currentDate" /&gt; &lt;/p&gt; &lt;script&gt; var today = new Date(); var dd = today.getDate(); var mm = today.getMonth() + 1; //January is 0! var yyyy = today.getFullYear(); if (dd &lt; 10) { dd = '0' + dd } if (mm &lt; 10) { mm = '0' + mm } var today = dd + '/' + mm + '/' + yyyy; document.getElementById('currentDate').value = today; &lt;/script&gt;</code></pre> </div> </div> </p>