export default {
  name: 'my-date',
  render(h) {
    const data = this.obj
    const Attrs = {
      placeholder: data.fieldHint,
      required: data.required,
      type: data.dateRangeType,
    }
    return (
      <div>
        <el-form-item label={this.obj.startPlaceholder} required={this.obj.required == 1}
                      style="width:100%;margin-bottom:10px!important">
          <el-date-picker style="width:100%!important" size="small" v-model={data.fieldValue[0]} attrs={Attrs}>
          </el-date-picker>
        </el-form-item>
        <el-form-item label={this.obj.endPlaceholder} required={this.obj.required == 1}
                      style="width:100%;margin-bottom:10px!important">
          <el-date-picker style="width:100%!important" size="small" v-model={data.fieldValue[1]} attrs={Attrs}>
          </el-date-picker>
        </el-form-item>
      </div>
    );
  },
  data() {
    return {
      date: ''
    }
  },
  props: {
    obj: {
      type: Object,
      default: {}
    }
  }
}
