设置时间选择范围

今天以及今天之后

 

                v-if="scope.row.dkClosingTime"

                style="width: 150px;"

                format="yyyy-MM-dd" value-format="yyyy-MM-dd"

                v-model="scope.row.tcEndTime"

                type="date"

                :picker-options="{

                disabledDate (time) {

                    let tomorrow = Date.now() ;

          return time.getTime() < new Date(new Date(tomorrow).toLocaleDateString()).getTime();

               }

              }"

                :placeholder="scope.$index !== 0 ? '同上': '请选择日期'">

              


今天之后

  :picker-options="{

                disabledDate (time) {

                  let tomorrow = Date.now() + 8.64e7;

          return time.getTime() < new Date(new Date(tomorrow).toLocaleDateString()).getTime();

               }

              }"

你可能感兴趣的:(设置时间选择范围)