Closed tobiasjpark closed 4 years ago
I'll test this ASAP and approve it if it works :)
It appears that event.start
and this.currentTerm.classesEnd
are different sorts of date objects.
Also to make sure that this works everywhere we use the mixin, specifically assessment work schedules, place it at the very very start of the eventRender
method:
eventRender ({ event, el, view }) {
if (event.extendedProps.eventType === 'course') {
// Prevent classes from showing up after the end of classes
if (moment(event.start).isAfter(this.currentTerm.classesEnd)) {
return false
}
}
// ------------
if (event.rendering === 'background') return
// ...
}
@Apexal Thanks! I think I fixed it.
Fixes #530
Proposed Changes
NOTE: I was unable to test whether this code fully works due to another bug which caused a 500 Internal Server Error (I believe it involves fullcalendar?); I notified @Apexal about this. After that bug is fixed, this code should be tested to verify that it works (and if it doesn't, further commits will be needed before approving this pull request).