时间禁用

This commit is contained in:
zhangsir
2024-02-27 14:41:44 +08:00
parent 4646ac81ee
commit 57acbf4fdc
2 changed files with 4 additions and 6 deletions

View File

@@ -170,6 +170,7 @@
@select="onDateEnd" @select="onDateEnd"
:open="openEnd" :open="openEnd"
@ok="onOkEnd" @ok="onOkEnd"
:disabled-date="disabledDate"
/> />
</div> </div>
</div> </div>
@@ -906,8 +907,7 @@ function openDrawer(row) {
nextTick(tableRef.value.fetch); nextTick(tableRef.value.fetch);
} }
const disabledDate = (current) => current && current < dayjs().startOf("day"); const disabledDate = (current) => current && current < dayjs(dateTime.value[0]);
// 删除文件返回参数 // 删除文件返回参数
const changevalue = (e) => { const changevalue = (e) => {
let arr = formData.value.attach.split(","); let arr = formData.value.attach.split(",");

View File

@@ -984,6 +984,7 @@
@select="onDateEnd" @select="onDateEnd"
:open="openEnd" :open="openEnd"
@ok="onOkEnd" @ok="onOkEnd"
:disabled-date="disabledDate"
/> />
</div> </div>
</div> </div>
@@ -5066,10 +5067,7 @@ function onFocusEnd(){
console.log("执行"); console.log("执行");
getTableDate(); getTableDate();
}; };
const disabledDate = (current) => { const disabledDate = (current) => current && current < dayjs(state.xjkkinputV3[0]);
// Can not select days before today and today
return current && current < dayjs().startOf("day");
};
const disabledDateTime = () => { const disabledDateTime = () => {
return { return {