From 561870b4e96321a5f79b4d6cd60367185de47d59 Mon Sep 17 00:00:00 2001 From: Khai Date: Wed, 17 Apr 2024 12:14:45 +0800 Subject: [PATCH] add fullcalendar eventListener --- resources/js/filament-fullcalendar.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/js/filament-fullcalendar.js b/resources/js/filament-fullcalendar.js index 86d925a..e9efe63 100644 --- a/resources/js/filament-fullcalendar.js +++ b/resources/js/filament-fullcalendar.js @@ -91,7 +91,12 @@ export default function fullcalendar({ calendar.render() + window.addEventListener('filament-fullcalendar--refresh', () => calendar.refetchEvents()) + window.addEventListener('filament-fullcalendar--prev', () => calendar.prev()) + window.addEventListener('filament-fullcalendar--next', () => calendar.next()) + window.addEventListener('filament-fullcalendar--today', () => calendar.today()) + window.addEventListener('filament-fullcalendar--goto', (event) => calendar.gotoDate(event.detail.date)) }, } }