效果:

 element ui 时间和日期选择器的数据回显_数据

 

 

<template>
  <div class="custom-tree-container">
    <el-time-picker is-range v-model="value1" value-format="HH:mm:ss" range-separator="" start-placeholder="开始时间"
      end-placeholder="结束时间" placeholder="选择时间范围">
    </el-time-picker>
    <br><br>
    <el-date-picker v-model="value2" type="daterange" range-separator="" start-placeholder="开始日期"
      end-placeholder="结束日期">
    </el-date-picker>
  </div>
</template>

<script>
  export default {
    name: "demo",
    data() {
      return {
        value1: [],
        value2: []
      }
    },
    watch: {

    },
    created() {
      this.set();
    },
    methods: {
      set() {
        this.value1 = ['9:12:41', '14:21:38'];
        this.value2 = [new Date('2014-04-26'), new Date('2021-03-21')]
      }
    }
  };
</script>