Listing every date between two dates in input fields
I wouldn't bother with calculating the difference - especially as it's not actually used for anything.

Instead I'd just do this:

var start = new Date(document.querySelector('[name="startdate"]').value),
    end = new Date(document.querySelector('[name="enddate"]').value),
    year = start.getFullYear(),
    month = start.getMonth()
    day = start.getDate(),
    dates = [start];

while(dates[dates.length-1] &lt; end) {
  dates.push(new Date(year, month, ++day));
}


That'll give you a dates array beginning with the start date and continuing up to and including the end date.

From there, it's pretty much the same as now: Create and append input elements. I'm not sure I like the &lt;br&gt;, though. I imagine it's mostly for layout purposes, in which case I'm sure you could handle it better in CSS.

As for the date formatting, I don't know of a way to change that. Browser support for the date-type input is very poor so just be glad if you can use it at all. But since it's not widely supported, you'll probably want to use a cross-browser widget anyway, and in that case you'll likely have options for formatting the date.