Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
1.3.2
-
None
Description
It seems there is an incompatibility between the HR Calendar Macro bundled in the HR app with FullCalendar. The way full calendar is loaded is not working anymore and the dates are not passed in the same format anymore making the HR JSON fail.
For the loading the following code is needed in HR Calendar Macro:
{{velocity}} #set($discard = $xwiki.jsx.use("Calendar.JQuery", {'defer': false, 'minify': false})) #set($discard = $xwiki.jsx.use("Calendar.JQueryUI", {'defer': false, 'minify': false})) #set($discard = $xwiki.jsx.use("Calendar.Moment", {'defer': false, 'minify': false})) #set($discard = $xwiki.jsx.use("Calendar.FullCalendar", {'defer': false, 'minify': false})) #set($discard = $xwiki.ssx.use("Calendar.FullCalendar")) ## #if($calcounter) #set($calcounter = $calcounter + 1) #else #set($calcounter = 1) #end (% id="calendar${calcounter}" %) ((( ))) {{html clean="false"}} <script> require(['fullcalendar', 'gcal'], function ($) { jQuery(document).ready(function() { // The page is now ready, initialize the calendar... jQuery('#calendar${calcounter}').fullCalendar({ events: "$xcontext.macro.params.json", header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, defaultView: 'basicWeek', weekends: false }) }); }); </script> {{/html}} {{velocity}}
For the JSON
#set($start = $request.start)
#set($end = $request.end)