Im sure this topic has been beaten to a pulp but I havent yet been able to find the solution. The library Im using (fullcalendar) changes the format of your dates and times after you have them displayed on the screen. If you use the eventClick
function and log
the start or end of an event the object looks something like this
Thu Jul 23 2020 23:59:00 GMT-0500 (Central Daylight Time)
Now I want to use this in a modal after an event has been clicked. During this function I need to run some checks on the date and time so I use JSON.stringify()
.
After I have done the above, my date now looks like this (notice the wrong date and time)
"2020-07-24T04:59:00.000Z"
Is there a non "hacky" way to solve this problem?