Search code examples
primefacesfullcalendarschedule

PrimeFaces Schedule not showing all times with some SlotDuration configuration


When using the default slotDuration of PrimeFaces Schedule, or "00:15:00" for an example, the component don't show all times. If I change it to some values like "00:45:00" or even "00:15:01", the schedule show all times correctly.

Inspecting the HTML/CSS, in the cases of not showing the time, the <td> tag don't have a <span> tag inside with the time, and has the CSS class "fc-minor"

I couldn't find in documentation about this problem. I already tested with the deprecated slotMinutes, but it has the same behaviour.

Schedule with blank spaces between times:

https://i.sstatic.net/WL55A.jpg

Schedule code:

<p:schedule id="agendaOcupacional" allDaySlot="false" timeFormat="HH:mm" axisFormat="HH:mm" 
        draggable="false" resizable="false" slotDuration="00:15:00"  timeZone="GMT-3" 
    displayEventEnd="true"  value="#{agendamentoBean.lazyEventModel}" locale="br"/>

I'm using Primefaces 6.1.

Thanks.


Solution

  • It appears PF is missing the value for slotLabelInterval which fixes this issue.

    I created this GitHub issue: https://github.com/primefaces/primefaces/issues/4896

    Submitted this PR: https://github.com/primefaces/primefaces/pull/4897

    Hopefully it will be fixed in PrimeFaces 7.1.

    For now you can use the Extender to configure it: https://primefaces.github.io/primefaces/7_0/#/components/schedule?id=extender-method