Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
Month and year: <input type="month" id="myMonth">
<p>Click the button to set a month and year for the month field.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
  document.getElementById("myMonth").value = "2014-02";
}
</script>
</body>
</html>