会议室预约时间选择器限制
This commit is contained in:
parent
4f41648fa4
commit
92c6bf687b
|
@ -73,6 +73,7 @@
|
||||||
v-model:value="roomCerateDate"
|
v-model:value="roomCerateDate"
|
||||||
placeholder="开始日期"
|
placeholder="开始日期"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
|
:disabled-date="disabledDate"
|
||||||
/>
|
/>
|
||||||
<a-time-picker
|
<a-time-picker
|
||||||
v-model:value="roomCreateTime"
|
v-model:value="roomCreateTime"
|
||||||
|
@ -279,6 +280,7 @@
|
||||||
style="width: 72%"
|
style="width: 72%"
|
||||||
v-model:value="formState.bookDate"
|
v-model:value="formState.bookDate"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
|
:disabled-date="disabledDate"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
@ -1260,6 +1262,11 @@
|
||||||
chengguoSearch()
|
chengguoSearch()
|
||||||
}
|
}
|
||||||
// 时间选择器限制----可用时间查询
|
// 时间选择器限制----可用时间查询
|
||||||
|
//获取不可选择的日期
|
||||||
|
const disabledDate = (current) => {
|
||||||
|
const time = moment().endOf('day').subtract(1, 'days')
|
||||||
|
return current && current < time
|
||||||
|
}
|
||||||
//获取不可选择的小时
|
//获取不可选择的小时
|
||||||
const disabledStartHours = () => {
|
const disabledStartHours = () => {
|
||||||
if (roomEndTime.value) {
|
if (roomEndTime.value) {
|
||||||
|
|
Loading…
Reference in New Issue