Skip to content

Instantly share code, notes, and snippets.

View laoneo's full-sized avatar
🎯
Focus on fixing stuff

Allon Moritz laoneo

🎯
Focus on fixing stuff
View GitHub Profile
@laoneo
laoneo / dayjs.js
Created October 21, 2024 13:56
Dayjs ES6 module for fullcalendar
import { createPlugin } from '@fullcalendar/core/index.js';
import { CalendarImpl } from '@fullcalendar/core/internal.js';
import dayjs from 'dayjs/esm/index';
import arraySupport from 'dayjs/esm/plugin/arraySupport';
import customParseFormat from 'dayjs/esm/plugin/customParseFormat';
import duration from 'dayjs/esm/plugin/duration';
import updateLocale from 'dayjs/esm/plugin/updateLocale';
import utc from 'dayjs/esm/plugin/utc';
dayjs.extend(arraySupport);
public function countItems() {
if($this instanceof WorkflowServiceInterface) {
return $this->getWFcountItems();
}
// Normal code here
}
public function build(&$query)
{
$this->updateEventParent($query);
return parent::build($query);
}
public function parse(&$segments)
{
$this->updateEventParent();