This question already has an answer here:
- How do I get the current date in JavaScript? 41 answers
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?
I hope this is what you want:
How do I get the current date in JavaScript?