From 57acbf4fdc0c0753493acf39cec78bb9847d386f Mon Sep 17 00:00:00 2001 From: zhangsir Date: Tue, 27 Feb 2024 14:41:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/AddOpenCourse.vue | 4 ++-- src/views/courselibrary/CoursewareManage.vue | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/drawers/AddOpenCourse.vue b/src/components/drawers/AddOpenCourse.vue index ee978e6b..4d2275aa 100644 --- a/src/components/drawers/AddOpenCourse.vue +++ b/src/components/drawers/AddOpenCourse.vue @@ -170,6 +170,7 @@ @select="onDateEnd" :open="openEnd" @ok="onOkEnd" + :disabled-date="disabledDate" /> @@ -906,8 +907,7 @@ function openDrawer(row) { nextTick(tableRef.value.fetch); } -const disabledDate = (current) => current && current < dayjs().startOf("day"); - +const disabledDate = (current) => current && current < dayjs(dateTime.value[0]); // 删除文件返回参数 const changevalue = (e) => { let arr = formData.value.attach.split(","); diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue index 94700466..9ec8537b 100644 --- a/src/views/courselibrary/CoursewareManage.vue +++ b/src/views/courselibrary/CoursewareManage.vue @@ -984,6 +984,7 @@ @select="onDateEnd" :open="openEnd" @ok="onOkEnd" + :disabled-date="disabledDate" /> @@ -5066,10 +5067,7 @@ function onFocusEnd(){ console.log("执行"); getTableDate(); }; - const disabledDate = (current) => { - // Can not select days before today and today - return current && current < dayjs().startOf("day"); - }; + const disabledDate = (current) => current && current < dayjs(state.xjkkinputV3[0]); const disabledDateTime = () => { return {