<!DOCTYPE html>
<html>
<head>
<script src="//d3js.org/d3.v3.min.js"></script>
<meta charset="utf-8">
<title>pirulo</title>
</head>
<body>
<input id="bday" type="date" name="bday">
<button onclick="doit()">OK</button>
<img src="">
<script>
function doit() {
var yyyymmdd = bday.value;
d3.select("body").append("p").text(bday.value);
}
</script>
</body>
</html>