1

enter image description hereI am fixing someone else's code and I'm not familiar with Full calendar. Can anybody help me with full calendar. I have an event set for 7:00AM-7:15AM, it should show that on the UI. What happens right now is that whenever I set to 15 mins duration the UI only shows the start time e.g. 7:00AM but if I select 30 mins or higher it shows the full duration e.g. 7:00AM-7:30AM.

Here's snippet of the controller.js

        weekends: true,
        //eventBackgroundColor: component.get('v.eventBackgroundColor'),
        eventBorderColor: component.get('v.eventBorderColor'),
        eventTextColor: component.get('v.eventTextColor'),
        slotDuration: '00:15:00',
        slotLabelInterval: 15,
        slotLabelFormat: 'h:mm a',
        minTime: "7:00:00",
        maxTime: "20:15:00",
        timezone: "Australia/Melbourne",            
        views: {
            workWeekView: {
                type: 'agendaWeek',
                duration: {
                    days: 7
                },
                title: 'Apertura',
                columnFormat: 'dddd', // Format the day to only show like 'Monday'
                hiddenDays: [0, 6] // Hide Sunday and Saturday?
            }
        },
ADyson
  • 57,178
  • 14
  • 51
  • 63
Shiro Mier
  • 465
  • 1
  • 4
  • 7
  • Firstly, which version of fullCalendar is being used, please? It looks like it might be an older version, but please confirm the exact version number, as it affects what functionality is available and how to configure it. The number should be visible somewhere in the code, or in the filename of the fullcalendar javascript file. – ADyson Jan 20 '22 at 13:23
  • I am using FullCalendar v3.2.0. – Shiro Mier Jan 20 '22 at 15:39

1 Answers1

0

The rule seems to be that if the event's duration is less than or equal to the length of the slot duration, it won't show the end date.

e.g. if the slotDuration is 30 minutes (the default) then any events whose duration is 30 minutes or less will not display the end time in the agenda view.

I thought that displayEventEnd might be able to override it, but that is already true by default for agenda views.

Demo: https://codepen.io/ADyson82/pen/vYeqdjo

There doesn't appear to be any way to change this behaviour in fullCalendar 3, unfortunately.

However if you upgrade to the (currently) latest fullCalendar - version 5 - then it's already the default behaviour to show the event end time in all cases, no matter the duration of the event.

Demo: https://codepen.io/ADyson82/pen/mdBZXQy

ADyson
  • 57,178
  • 14
  • 51
  • 63