设置当前日期之前不可选择

This commit is contained in:
shenyanpei
2021-12-29 14:06:24 +08:00
parent f8f0b69562
commit 37e1fb3b94
2 changed files with 31 additions and 3 deletions
+23 -2
View File
@@ -174,10 +174,11 @@
</el-table-column>
</el-table>
</el-form-item>
<el-form-item class="add-form-item" label="会议时间:">
<el-form-item class="picker_style" style="margin-bottom: 0;min-height: 50px;line-height: 50px;border-bottom: 1px dashed #e5e5e5;" label="会议时间:">
<el-date-picker
v-model="editMeetForm.date"
type="datetime"
:picker-options="datePicker"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
align="right">
@@ -339,7 +340,13 @@ export default {
// 议题选中时储存数组
deleteTable: [],
loading: false,
dialogTitle: ''
dialogTitle: '',
datePicker: {
disabledDate(date) {
return date.getTime() < Date.now() - 24 * 60 * 60 * 1000
}
}
}
},
mounted() {
@@ -819,6 +826,19 @@ export default {
@import '~@/assets/styles/style';
.standCalendar {
.content_form {
/deep/.el-input--suffix .el-input__inner {
border: 0;
}
label-input-form {
.picker_style {
margin-bottom: 0;
min-height: 50px;
line-height: 50px;
border-bottom: 1px dashed #e5e5e5;
}
}
}
.date-picker {
.item {
/deep/ .el-input {
@@ -874,6 +894,7 @@ export default {
margin-top: 50px;
}
.card_info {
height: 190px;
margin-top: 10px;
@@ -82,6 +82,7 @@
<el-date-picker
v-model="ch_pageData.meetingStartTime"
type="datetime"
:picker-options="datePicker"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
align="right">
@@ -453,7 +454,13 @@ export default {
isSubmit: false,
saveLoading: false,
commentInfo: '',
bpnId: ''
bpnId: '',
// 设置当前日期之前不可选择
datePicker: {
disabledDate(date) {
return date.getTime() < Date.now() - 24 * 60 * 60 * 1000
}
}
}
},
mounted() {