Failing to save object to database

I have the following code which is attempting to store 2 types of object to the moralis database, but I am getting the following error message

FAILED@Event Error: XMLHttpRequest failed: “this.$d.toISOString is not a function” at handleError (RESTController.js:457)

Here is the code I have written:

import Moralis from 'moralis';
import { hash } from 'object-hash';

const Ticket = Moralis.Object.extend('Ticket');
const Event = Moralis.Object.extend('Event');

const uploadFileToIPFS = async (image) => {
  const imageFile = new Blob(image.src, { type: 'image/png' });
  const fileName = `${hash(imageFile)}.png`;
  const moralisFile = new Moralis.File(fileName, imageFile);
  await moralisFile.saveIPFS();
  return moralisFile;
};

export const createEventAndTickets = async (
  eventName,
  eventDescription,
  eventDate,
  eventOrganiser,
  eventVenue,
  eventTickets
) => {
  const event = new Event();
  event.set('eventName', eventName);
  event.set('eventDescription', eventDescription);
  event.set('eventDate', eventDate);
  event.set('eventVenue', eventVenue);
  event.set('eventOrganiser', eventOrganiser);
  event.save().then(
    (event) => {
      const eventId = event.id;
      console.log('got to here');
      console.log('New event created with id: ' + eventId);
      eventTickets.forEach((x) => {
        const ticketX = new Ticket();
        const {
          timestamp,
          art,
          ticketPrice,
          fontColor,
          color1,
          color2,
          ticketQuantity,
          ticketName,
        } = x;
        if (art) {
          const imageFile = uploadFileToIPFS(art);
          ticketX.set('art', imageFile);
          ticketX.set('artURL', imageFile.ipfs());
          console.log(imageFile.ipfs());
        }
        ticketX.set('eventId', eventId);
        ticketX.set('timestamp', timestamp);
        ticketX.set('ticketPrice', ticketPrice);
        ticketX.set('fontColor', fontColor);
        ticketX.set('color1', color1);
        ticketX.set('color2', color2);
        ticketX.set('ticketName', ticketName);
        ticketX.set('ticketQuantity', ticketQuantity);
        ticketX.set('numberMinted', 0);
        ticketX.save().then(
          (ticket) => console.log('New ticket created with id: ' + ticket.id),
          (err) => console.error('FAILED@Ticket', err)
        );
      });
    },
    (err) => console.error('FAILED@Event', err)
  );
};

maybe it tries to convert this date to some kind of ISO format,
you could try without setting this field to see if it works

you could try something similar for

I placed console.log lines throughout the code, and as far as I can see, the line it fails is here

that line fails because that is the line that does all the save operations, but it fails because of the parameters that were used before calling .save()

Which parameters are causing the issue?

I guess that some parameter related to date or timestamp, I don’t know exactly, that is why I said to try to remove those 2 parameters to see if it works