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 {