title: Set date input type default value to Today, Tomorrow, Anydate?
body: <p>In HTML5 there is not a native way of specifying 'today' in the value attribute. Here is the jQuery code I like very much. How to extend this code to set</p>
  
  <ul>
  <li>today's date to <code>var today</code></li>
  <li>tomorrow's date to <code>var tomorrow</code></li>
  <li>any date calculated to <code>var anydate</code> (calculated/initiated from <code>var today</code>?)</li>
  </ul>
  
  <p>and define the following 3 id-s accordingly:</p>
  
  <ul>
  <li><code>#theDate</code></li>
  <li><code>#theTomorrow</code></li>
  <li><code>#theAnydate</code></li>
  </ul>
  
  <p>HTML</p>
  
  <pre><code>&lt;input type="date" id="theDate"&gt;
  </code></pre>
  
  <p>jQuery</p>
  
  <pre><code>$(document).ready(function() {
      var date = new Date();
  
      var day = date.getDate();
      var month = date.getMonth() + 1;
      var year = date.getFullYear();
  
      if (month &lt; 10) month = "0" + month;
      if (day &lt; 10) day = "0" + day;
  
      var today = year + "-" + month + "-" + day;       
      $("#theDate").attr("value", today);
  });
  </code></pre>
  
  <p><a href="http://jsbin.com/oqekar/2/edit" rel="noreferrer"><strong>demo</strong></a></p>