날짜 폼만 눌러도 나오게
This commit is contained in:
parent
204b7a28a5
commit
f3b7ae315f
@ -20,16 +20,22 @@
|
|||||||
v-model="title"
|
v-model="title"
|
||||||
@keyup="ValidHandler('title')"
|
@keyup="ValidHandler('title')"
|
||||||
/>
|
/>
|
||||||
<form-input
|
<div class="date-picker-container" @click="focusDateInput">
|
||||||
title="종료날짜"
|
<form-input
|
||||||
name="endDate"
|
title="종료날짜"
|
||||||
type="datetime-local"
|
name="endDate"
|
||||||
:is-essential="true"
|
type="datetime-local"
|
||||||
:is-alert="endDateAlert"
|
:is-essential="true"
|
||||||
v-model="endDate"
|
:is-alert="endDateAlert"
|
||||||
:min="today"
|
v-model="endDate"
|
||||||
@change="ValidHandlerendDate"
|
:min="today"
|
||||||
/>
|
@change="ValidHandlerendDate"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 숨겨진 input 태그를 사용하여 강제로 포커스 -->
|
||||||
|
<input ref="dateInput" type="datetime-local" v-model="endDate" class="hidden-date-input">
|
||||||
|
|
||||||
<!-- 항목 입력 반복 -->
|
<!-- 항목 입력 반복 -->
|
||||||
<div v-for="(item, index) in itemList" :key="index">
|
<div v-for="(item, index) in itemList" :key="index">
|
||||||
<form-input
|
<form-input
|
||||||
@ -124,6 +130,16 @@ const userListTotal = ref(0);
|
|||||||
const addvoteitem = ref(false);
|
const addvoteitem = ref(false);
|
||||||
const addvotemulti= ref(false);
|
const addvotemulti= ref(false);
|
||||||
|
|
||||||
|
const dateInput = ref(null);
|
||||||
|
|
||||||
|
const focusDateInput = () => {
|
||||||
|
if (dateInput.value) {
|
||||||
|
dateInput.value.showPicker(); // 달력 자동 열기 (일부 브라우저에서 지원)
|
||||||
|
dateInput.value.focus(); // 포커스 이동
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const userSet = ({ userList, userTotal }) => {
|
const userSet = ({ userList, userTotal }) => {
|
||||||
activeUserList.value = userList;
|
activeUserList.value = userList;
|
||||||
userListTotal.value = userTotal;
|
userListTotal.value = userTotal;
|
||||||
@ -219,5 +235,17 @@ const goList = () => {
|
|||||||
.item-input {
|
.item-input {
|
||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
}
|
}
|
||||||
|
.date-picker-wrapper {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.hidden-date-input {
|
||||||
|
position: absolute;
|
||||||
|
top: 31.5%;
|
||||||
|
left: 17%;
|
||||||
|
width: 100%;
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user