Hello,
I am trying to pass a variable to a date object and then increment the date object. The format of the variable is dd/mm/yyyy. I have tried using Date.parse but am getting incorrect results:
The date I am trying parse is:
Code:
var myDatetemp=Date.parse(document.getElementById("loggeddate").value);
var myDate=new Date(myDatetemp);
I then increment the date by, say 1 day:
Code:
myDate.setDate(myDate.getDate()+1);document.getElementById('deadline').value=myDate.getDate() + "/" + (myDate.getMonth()+1)+ "/" + myDate.getYear();break;
What I get returned is: