title: Angular pikaday date formatting
body: <p>I'm using <code>angular-pikaday</code> plugin (<a href="https://github.com/nverba/angular-pikaday" rel="nofollow">https://github.com/nverba/angular-pikaday</a>) and I have a problem with a date formatting.</p>
  
  <p>What I need to get is a model with a string of date in format <code>YYYY-MM-dd</code>.</p>
  
  <p>I've installed <code>Moment.js</code> through bower (as documentation says that it's needed). Part of code looks like this (angular-pikaday.coffee)</p>
  
  <pre><code>picker = new Pikaday(
        field: elem[0]
        trigger: document.getElementById(attrs.triggerId)
        bound: attrs.bound isnt "false"
        position: attrs.position or ""
        format: "YYYY-MM-dd" # Requires Moment.js for custom formatting
        defaultDate: new Date()
        setDefaultDate: attrs.setDefaultDate is "true"
        firstDay: 1
        ( ... )
  </code></pre>
  
  <p>How can I put formatted date inside ng-model passed in HTML?</p>