Calendar Plugin Start Time and Due Dates


Hello all,

I’m trying to troubleshoot A Calendar plugin issue that has been closed, and I’m running into something where I’m way over my head. I do want this to get fixed, but I’m having trouble with Javascript, as I’m mainly a sysadmin, and not much adept at this stuff.

What I’m finding is that in calendar.js, lines 26-38, the date_due variable gets set and populated into the database. I’m not sure of the javascript that I need to figure out what I’m trying to do.

I’m trying to change the date_due value into a conditional value, in that:

date_due should be W + X if Y is Z, otherwise, date_due should be A + B

However, I’m not sure how to put this into Javascript code at this level.

Is there anything special that I have to put in at line 35 to indicate that I want this value to be conditional? (EDIT: I basically want a large if-else statement here to figure out what’s going on with that variable)

Additionally, this conditional is based on the event object, so (AFAIK) it needs to be within the eventDrop function…


FWIW, I submitted a PR for this functionality:

It was around this time that I learned just how painful Javascript is to use. Believe it or not, those 30 lines took about 25-30 hours to figure out.