I'm trying to take a date from a date picker and then output the date to the value of a second picker.
I should work like this,
- fill in dateIn
- press button
- date displayed on dateOut picker
My code:
<input id="dateIn" name="dateIn" type="date" value=""/>
<input id="dateOut" name="dateOut" type="date" value=""/>
<button type="button" onclick="FunctionDate()">Click Me!</button>
Here is the function: (It does run when the button is pressed)
function FunctionDate() {
Document.getElementById("dateOut").value = Document.getElementById("dateIn").value;
}
The problem is in the function, but what should run in there?