more date fixes
This commit is contained in:
@ -230,10 +230,13 @@ const AvCalendar = ({ publisherId, events, selectedDate, cartEvents }) => {
|
||||
end = common.setTimeHHmm(startdate, "23:59");
|
||||
}
|
||||
|
||||
setDate(start);
|
||||
let existingEvents = filterEvents(evts, publisherId, startdate);
|
||||
console.log("handleSelect: " + existingEvents);
|
||||
setCartEvent(getCartEvent(date));
|
||||
// Update date state and calculate events based on the new startdate
|
||||
setDate(startdate);
|
||||
const existingEvents = filterEvents(evts, publisherId, startdate);
|
||||
console.log("handleSelect: ", existingEvents);
|
||||
|
||||
// Use the updated startdate for getCartEvent and ensure it reflects in the state properly
|
||||
setCartEvent(getCartEvent(startdate));
|
||||
setSelectedEvents(existingEvents);
|
||||
setIsModalOpen(true);
|
||||
};
|
||||
|
Reference in New Issue
Block a user