fix:formatDate
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m56s

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-01-21 13:14:33 +07:00
parent 99bba05167
commit 8867829211
3 changed files with 36 additions and 54 deletions

View file

@ -430,8 +430,12 @@ function changeFormData() {
/** เช็ควันที่สิ้นสุดต้องมากกว่า หรือเท่ากับวันเริ่ม */
function changeFormDataDate() {
isSave.value = true;
const startDate = new Date(formData.investigationDateStart as Date);
const endDate = new Date(formData.investigationDateEnd as Date);
const startDate = moment(
new Date(formData.investigationDateStart as Date)
).startOf("day");
const endDate = moment(
new Date(formData.investigationDateEnd as Date)
).startOf("day");
if (startDate > endDate) {
formData.investigationDateEnd = null;