title: Using Knockout.js how do bind a Date property to a HTML5 date picker?
body: <p><em>(this only works in Chrome at the moment as most browsers don't yet implement date picker for input type="date")</em></p>
  
  <p>In the following example MyDate starts out as a Date object with the current date, but this isn't picked up by the date input (which expects its format to be a string in format YYYY/MM/DD).</p>
  
  <p>Once you've picked a date in the picker then MyDate becomes a string in format above.</p>
  
  <p>How can you bind this so MyDate stays a javascript Date and is interpreted by the input control correctly?</p>
  
  <p>See See <a href="http://jsfiddle.net/LLkC4/3/">http://jsfiddle.net/LLkC4/3/</a> :-</p>
  
  <pre><code>&lt;input data-bind="value : MyDate" type="date"&gt;
  &lt;hr&gt;   
  &lt;span data-bind="html: log" /&gt;
  
  &lt;script&gt;
  var viewModel = {    
      MyDate : ko.observable(new Date()),
      log : ko.observable(""),
      logDate : function () { 
              this.log(this.log() + this.MyDate() + " : " +
                       typeof(this.MyDate()) + "&lt;br&gt;");
                       }
  };
  
  viewModel.MyDate.subscribe(function (date) {    
      viewModel.logDate();    
  });
  
  ko.applyBindings(viewModel);
  
  viewModel.logDate()
  &lt;/script&gt;
  </code></pre>