date issue 7

This commit is contained in:
2025-05-19 08:49:04 +05:30
parent b5132581c0
commit 67dcc94d8e
4 changed files with 18 additions and 2 deletions

View File

@@ -383,12 +383,16 @@ export default function AppointmentsPage() {
appointmentData.date instanceof Date
? appointmentData.date
: new Date(appointmentData.date); // this is unsafe if it's "yyyy-MM-dd"
console.log("Appoiment date.date ",appointmentData.date);
console.log("Raw date", rawDate);
const updatedData = {
...appointmentData,
date: toUTCDateString(rawDate), // 👈 This ensures consistent date across all environments
};
console.log("update data: ", toUTCDateString(rawDate));
// Check if we're editing an existing appointment with a valid ID
if (
editingAppointment &&