<template>
  <DatePicker
    style="width:100%"
    :placeholder="info.form.placeholder"
    :type="info.form.formType"
    :format="info.form.format"
    :disabled="info.form.disabled||!info.isNew"
    :clearable="info.form.clearable"
    :separator="info.form.separator"
    :size="size"
    v-model="info.defaultValue">
  </DatePicker>
</template>
<script>
import { baseComponentMixins } from '../mixins'

export default {
  name: 'BaseDatePicker',
  mixins: [ baseComponentMixins ],
  watch: {
    'info.form.formType'(v) {
      console.log(v, 44)
      if (v.includes('range')) {
        this.info.defaultValue = ['', '' ]
      } else {
        this.info.defaultValue = ''
      }
    },
  },
}
</script>