title: Vue js apply filter on v-model in an input field
body: <p>Hope someone can help me! I have made a directive wrapping the Jasny Bootstrap Plugin more specifically the input-mask thing and everything goes well!</p>
  
  <p>Now I have made a custom filter supported by moment to format the date field!</p>
  
  <p>The date format that I receive from my backend application is YYY-MM-DD and I must show on the view as DD/MM/YYYY... I've tried <code>v-model="date | myDate"</code> but it didn't work properly!</p>
  
  <p><strong>JS</strong></p>
  
  <pre><code>Vue.directive('input-mask', {
    params: ['mask'],
  
    bind: function() {
      $(this.el).inputmask({
        mask: this.params.mask
      });
  
    },
  });
  
  Vue.filter('my-date', function(value, formatString) {
  
    if (value != undefined)
      return '';
  
    if (formatString != undefined)
      return moment(value).format(formatString);
  
    return moment(value).format('DD/MM/YYYY');
  
  });
  
  var vm = new Vue({
    el: 'body',
    data: {
      date: '2015-06-26',
    }
  });
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;label&gt;Date&lt;/label&gt;
  &lt;input type="text" class="form-control" v-input-mask mask="99/99/9999" v-model="date"&gt;
  &lt;p&gt;{{ date | myDate 'dd/mm/yyyy' }}&lt;/p&gt;
  </code></pre>
  
  <p>There is the <a href="https://jsbin.com/yayuyo/edit?html,js,output" rel="noreferrer">JSBin</a> if somebody's interested!</p>
  
  <p>Thanks in advance!</p>
  
  <p><strong>EDIT: Explaining better what I expect =)</strong></p>
  
  <p>When the page first load the input receive the value of 2015-06-26 and I would like to show that value as DD/MM/YYYY so 26/06/2015! It works properly only after I start typing something!</p>