后端传输过来起止时间,需要回显在 el-date-picker中
未修改前的代码:

 
 
问题整改:需要将时间转换为Date类型
修改后的代码


  setTime(date){
                if (date!=null){
                    this.value.push(new Date(date.startTime))
                    this.value.push(new Date(date.endTime))
                    console.log(" this.value")
                    console.log( this.value)
                }
            }, 
他只接受Date类型的时间,所以需要在数据接收到时,前端将时间转换为Date类型。


















