pramod_Bug#122Check-INOUT-Time #57

Closed
pramod.mahajan wants to merge 10 commits from pramod_Bug#122Check-INOUT-Time into Issues_April_5W
Showing only changes of commit 8e04dd2191 - Show all commits

View File

@ -69,8 +69,10 @@ const TimePicker = ({ label, onChange, interval = 10, value,checkInTime, checkOu
} }
} else if (checkInDate && checkOutDate) { } else if (checkInDate && checkOutDate) {
// Case 3: Both check-in and checkout present // Case 3: Both check-in and checkout present
const isSameDay = new Date(checkOutDate).toDateString() === new Date().toDateString();
minSelectable = new Date(checkOutDate); minSelectable = new Date(checkOutDate);
maxSelectable = new Date(currentSlot); maxSelectable = isSameDay ? new Date(dayEnd) : new Date(currentSlot);
} }
const slot = new Date(dayStart.getTime()); const slot = new Date(dayStart.getTime());