To fix this issue, you need to normalize the dates and handle them consistently across your React app, MongoDB, and Express API:
javascript Copy code const normalizeDate = (date) => { const utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate())); return utcDate; }; Use this function when saving dates to MongoDB.