<li class="more" v-if="showMore" style="position:relative;" @click="showMorTime">更多日期
                <el-date-picker
                    v-model="chooseCurrentDtae"
                    type="date"
                    ref="timePick"
                    class="timePickCss"
                    @change="changeMoreTime"
                    :picker-options="pickerOptionsStart"
                    placeholder="选择日期">
                </el-date-picker>
            </li>
  data() { 
    return {
        chooseCurrentDtae:'',
        pickerOptionsStart: {
            disabledDate: (time) => {
                return  time.getTime() < new Date().getTime() - 24*60*60*1000 || time.getTime() >  new Date().getTime()+29*24*60*60*1000;
            }
        },
    }
  },
    // 显示更多日期
    showMorTime(){
        this.$refs.timePick.$refs.reference.$refs.input.focus();
    },
.timePickCss{
    position: absolute;
    top:0px;
    right: 100px;
    z-index: -1;
}

 

posted on 2022-08-02 16:44  刘世涛6192  阅读(644)  评论(0编辑  收藏  举报