title: AngularJS get formatted date in ng-model
body: <p>I have following text input filled by model value in timestamp:</p>
  
  <pre><code>&lt;input type="datetime" ng-model="workerDetail.dateOfBirth"  class="form-control" id="date_of_birth" /&gt;
  </code></pre>
  
  <p>It displays value in input as given timestamp. </p>
  
  <p>I would like to convert value which is visible in input into formatted date (YYYY/MM/DD), but in model should be always as timestamp. </p>
  
  <p>I tried to do it by this way:</p>
  
  <pre><code>{{workerDetail.dateOfBirth | date:'MMM'}}
  </code></pre>
  
  <p>But without luck. </p>
  
  <p>Thanks for any advice.</p>