How to get current formatted date dd/mm/yyyy in Javascript and append it to an input [duplicate]

I would like to add a current date to a hidden HTML tag so that it can be sent to the server:

<input type="hidden" id="DATE" name="DATE" value="WOULD_LIKE_TO_ADD_DATE_HERE">

How can I add a formatted date to the VALUE attribute?

7 Answers
7

Leave a Comment