title: VueJS set date value as Date instead of String
body: <p>I need to change type of datepicker value and it should return value as type Date instead of String <a href="https://prnt.sc/r6vr3g" rel="nofollow noreferrer">https://prnt.sc/r6vr3g</a>. But i don't know how can i make it.
  Can anyone pls help me?</p>
  
  <p>Here is code:</p>
  
  <pre><code>&lt;template&gt;
    &lt;q-input
  @focusin="onFocusIn"
  :value="value"
  @input="e =&gt; $emit('input', e.toString())"
  @click="alert = true"
   &gt;
  &lt;q-dialog v-model="alert"&gt;
    &lt;q-date
      :value="value" @input="onInput"
      :mask="mask"
    /&gt;
  &lt;/q-dialog&gt;
  </code></pre>
  
  <p>
      </p>
  
  <pre><code>&lt;script&gt;
  
      import _ from 'lodash'
  
      export default {
    props: {
      ..props
    },
  
    data () {
      return {
        alert: false,
        sValue: ''
      }
    },
  
    ..computed
  
    methods: {
      onInput (e) {
        let dateObj = new Date(e)
        this.$emit('input', dateObj)
        this.alert = false
      },
  
      onFocusIn (e) {
        e.target.blur()
      }
    }
  
  }
  
  &lt;/script&gt;
  
  &lt;style type="text/css"&gt;
  
  &lt;/style&gt;
  
  
  &lt;div class="col"&gt;
     &lt;s-datetime-picker v-model="data.dateStart" label="Date Start" required /&gt;
     {{ data.dateStart }}
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is code for datepicker component and after that there si example of using this component.</p>
  
  <p>I've edited code, because i changed component. Now i have another error, in input field it shows message 'Invalid Date' and in console i got this error "failed for prop "value". Expected String with value "Invalid Date", got Date"</p>