question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

businessHours are not rendered properly in resourceTimelineMonth view when CSS margin and font-size are set

See original GitHub issue

Bug Reports

Weekends are not rendered properly in v4 in resourceTimelineMonth view. They are misplaced along the x axis. Other views render weekends ok. Btw, I am using the default theme. I have an extra custom button which loads resources and events dynamically.

      businessHours: {
        daysOfWeek: [1, 2, 3, 4, 5],
        startTime: '08:00',
        endTime: '16:00'
      },

Screenshot 2019-03-21 at 08 58 50

This happens both with Chrome, Safari and Firefox on MacOS. If I resize the browser, the glitch disappears. It looks like the left positions of the weekend highlights are not calculated correctly.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
arshawcommented, Mar 22, 2019

yes, this problem will happen when a font is loaded after pageload and affects the dimensions. I can’t think of an elegant way to solve this other than have the dev make their own handler that calls updateSize. I actually had to do that for FullCalendar Scheduler’s homepage, using window.onload. see…

https://fullcalendar.io/assets-more/scheduler-index.js?1611535588

 // readjust sizing after font load
window.addEventListener('load', function() {
  calendar.updateSize();
});
0reactions
lucasbrtdcommented, Mar 24, 2020

Hi, I also encountered this render problem but I succeed to fix it by putting a listener on calendar loading and inside, update the size of the calendar :

calendar.on('loading', function () {
    calendar.updateSize();
});

I refer to the documentation here : https://fullcalendar.io/docs/handlers Hope it was helpful ! 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Paragraph is not respecting margin of heading - html
Margin refers to another's element position not including its margins. You can sum padding but not sum margins. html { font-size: 18px; line-height:...
Read more >
Everything You Need To Know About CSS Margins
Margin collapsing means that when a heading with a bottom margin, is followed by a paragraph with a top margin, you do not...
Read more >
CSS - How to avoid child being affected - Microsoft Q&A
I have a data grid and inside this data grid, there is another grid inside of the dropdown. How to only make the...
Read more >
CSS margin property - W3Schools
The margin property sets the margins for an element, and is a shorthand property for the following properties: ... If the margin property...
Read more >
Margin not working for images ? (Example) - Treehouse
Get access to thousands of hours of content and a supportive community. ... not working similarly iI tried to style img tag with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found