i have a field where you have to enter the date but i also have a script on that field which automatically inserts the current date. The problem i have is that the date is formatted like M/DD/YYYY 00:00:00 AM/PM but i just wanted it to be like DD/MM/YY.
Here is my current code by the way :
<b>Date of Registration:</b> <input type="text" id="txtregodate" name="regodate">
<script type="text/javascript">
var now = new Date ();
document.getElementById('txtregodate').value = now.toLocaleString();
</script>
Is there a way to format that function i'm using in that way?