date issue fixed4

This commit is contained in:
2025-07-15 23:48:52 +05:30
parent d90aa5bd2b
commit b78c7184db

View File

@@ -441,7 +441,7 @@ export default function AppointmentsPage() {
const selectedDateAppointments = appointments.filter((appointment) => {
const dateObj =
typeof appointment.date === "string"
? new Date(appointment.date)
? parseLocalDateString(appointment.date)
: appointment.date;
return formatLocalDate(dateObj) === formatLocalDate(selectedDate); // formattedDate should be 'yyyy-MM-dd' string in UTC format as well