title: How do I format Angular Material's md-datepicker for Django REST Framework?
body: <p><strong><em>EDITED the original question after further research.</em></strong></p>
  
  <p>Using Angular Material, I have a relatively simple form inside an <code>$mdDialog</code> that makes a POST request to a Django REST Framework endpoint. <strong>All the data submits just fine except that from the <code>md-datepicker</code> element.</strong></p>
  
  <p>I can pick a date, bind it to a variable in my controller, and even display the data in real-time (just below <code>md-datepicker</code>) w/ Angular templating. That output suggests that the selected date is just a standardized date string:</p>
  
  <p><code>"2015-11-27T06:00:00.000Z"</code></p>
  
  <p>But on submit, what gets sent as form data is a different longform string:</p>
  
  <pre><code>parsed: Fri Nov 20 2015 00:00:00 GMT-0600 (Central Standard Time)
  raw: Fri+Nov+20+2015+00%3A00%3A00+GMT-0600+(Central+Standard+Time)
  </code></pre>
  
  <p>This causes Django REST Framework to throw up a Bad Request exception since that format isn't listed in my settings.py as acceptable. I need it either format the <code>md-datepicker</code> output to <code>MM-DD-YYYYThh:mm:ss.uuuuuuZ</code>, or specify another format in my settings.py, which currently has those values:</p>
  
  <pre><code>REST_FRAMEWORK = {
      'DATETIME_FORMAT': ('%m-%d-%YT%H:%M:%S.%fZ'),
      'DATETIME_INPUT_FORMATS': ('%m-%d-%YT%H:%M:%S.%fZ', '$m-%d-$y')
  }
  </code></pre>
  
  <p><strong>How do I format an <code>md-datepicker</code> POST value to an output Django REST Framework can understand?</strong> I've checked out the following threads which call for updating the <code>.parseDate</code> and <code>.formatDate</code> methods in <code>$mdDateLocaleProvider</code> but that doesn't change the value that eventually gets injected into my post request:</p>
  
  <p><a href="https://stackoverflow.com/questions/32566416/change-format-of-md-datepicker-in-angular-material">Change format of md-datepicker in Angular Material</a></p>
  
  <p>Any help appreciated - relatively new to Angular. Thanks, all.</p>