Q:

What format does .getDay() accept?

Ok, so what I want to do is to retrieve some info from an input element, which is of type date. I then store this in a .json file, and I parse it later on to retrieve the data upon program start. After that, I want to use the date.getDay() function to figure out what day that date falls on. 
I have only seen examples using var d = new Date(), and something tells me that the 'format' is different when using new Datethan using document.getElementById("dateInput").value; 
Anyone catch my drift? 
To sum up, I want to be able to find the day from the values outputted by an input type = "date" element.

A:

Date.getDay() does not accept the default type (String) that gets returned by the elem.value()-call.
You have to pass a Date.
So you can convert any legit string to a date using the "new Date()" constructor.
let dateString = "2018-03-08"
let dateFromString = new Date(dateString) // working

Please have a look at this example code:

let date = new Date(mydate.value)
let day = date.getDay()
console.log(day)
<input id="mydate" type="date" value="2018-03-08">

You could also find some helps in the docs:

Date JavaScript
JavaScript Date Reference

