title: Add days to a specific date with a integer with Javascript
body: <p>This is my code below. I'm trying to do this in my code:</p>
  
  <p><code>input = 2014-02-09 + 5 days</code>, which should give <code>2014-02-14</code>, but instead I get the result: <code>2019-02-09</code> instead.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;body&gt;
      &lt;input type="date" id="myDate" value="2014-02-09"&gt;
      &lt;input type="number" id="number" value="5"&gt;
      &lt;button onclick="myFunction()"&gt; Try it &lt;/button&gt;
  
      &lt;p id="demo"&gt;&lt;/p&gt;
      &lt;p id="demo2"&gt;&lt;/p&gt;
      &lt;p id="demo3"&gt;&lt;/p&gt;
  
      &lt;script&gt;
        function myFunction() 
        {
          var x = document.getElementById("myDate").value;
          document.getElementById("demo").innerHTML = x;
          var y = document.getElementById("number").value;
          document.getElementById("demo2").innerHTML = y;
          var d = parseInt(x) + parseInt(y);
          document.getElementById("demo3").innerHTML = d;
        }
      &lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How I can get my desired result: <code>2014-02-09 + 5 days = 2014-02-14</code>?</p>