Jump to content

Recommended Posts

Use this code in the footer of the submission page:

today = new Date();
yesterday = new Date(today);
yesterday.setDate(today.getDate() - 1);

var dd = yesterday.getDate();
var mm = yesterday.getMonth()+1; //January is 0!

var yyyy = yesterday.getFullYear();
if(dd<10){dd='0'+dd} if(mm<10){mm='0'+mm} yesterday = mm+'/'+dd+'/'+yyyy;

document.getElementById("InsertRecordStartDate").value =  yesterday;

I got this code from https://stackoverflow.com/questions/16686640/function-to-get-yesterdays-date-in-javascript-in-format-dd-mm-yyyy

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...