title: How to convert MongoDB ISODate to be compatible with input[type="date"]
body: <p>I'm having an issue where I'm using mongoDB to store dates as part of objects, and I'm exposing those objects on the front end using Meteor and Angular. What it is giving me is almost right, but since I'm trying to keep the data-binding working, I can't work out how to manipulate the objects before giving them to Meteor.</p>
  
  <p>I believe what I need to do is modify each object which matches the db.table.find() query before returning it to Meteor.</p>
  
  <p>The objects in the table have this structure:</p>
  
  <pre><code>{
      date: ISODate(2017-05-04T14:00:00Z),
      note: "Foo"
  }
  </code></pre>
  
  <p>I am publishing them like this:</p>
  
  <pre><code>Meteor.publish('tasks', function tasksPublication() {
      var tasks = Tasks.find();
      return tasks;
  });
  </code></pre>
  
  <p>The front end is hooked up like this.</p>
  
  <pre><code>&lt;label&gt;Date: &lt;input type="date" ng-value="{{task.date}}" /&gt; &lt;/label&gt;
  </code></pre>
  
  <p>The problem with this is the format of the date: it includes everything from the "T", when it shouldn't have that part for input date fields.
  How do I modify the object on the way out of the database?</p>