รีเซ็ต date

This commit is contained in:
setthawutttty 2024-02-14 11:51:00 +07:00
parent 9814c9f01a
commit 92aaccc791
3 changed files with 43 additions and 15 deletions

View file

@ -1457,9 +1457,13 @@ watch(
() => dateAnnounceInput.value,
(value: string) => {
if (value.length === 10) {
const dateVal = convertDate(value);
dateAnnounce.value = dateVal.value;
console.log(dateAnnounce.value);
if (dateVal.isValid) {
dateAnnounce.value = dateVal.value;
} else {
dateAnnounceInput.value = "";
}
}
}
);
@ -1468,7 +1472,11 @@ watch(
(value: string) => {
if (value.length === 10) {
const dateVal = convertDate(value);
refCommandDate.value = dateVal.value;
if (dateVal.isValid) {
refCommandDate.value = dateVal.value;
} else {
refCommandDateInput.value = "";
}
}
}
);