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.

First day in View - Event spans from previous day ignoring nextDayThreshold

See original GitHub issue

I’m using fullcalendar-3.7.0. I’m working on a calendar to display on-call shifts. They are consistent 24 hour shifts from 8am to 8am the next day.

I only want the shifts to display on their start date so I’ve turned off spanning by using: nextDayThreshold: "09:00:00"

Expected Results: All events respect nextDayThreshold and are only displayed on their Start Date

Actual Result: Most events respect nextDayThreshold, except the first day in the basic monthly/week view also displays the spanned events from the previous day. These events don’t display the time and are left-aligned in the cell.

Here is a JSbin example - The issue is visible in the Month/Week view on October 1st: http://jsbin.com/sibehix/14/edit?html,js,output

This is causing some confusion among users. Is there a way to have the first day of the view respect the nextDayThreshold like the other days?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
acerixcommented, Nov 20, 2017

Thanks for the report, I agree that since Shift 1 starts in Sept and ends at 8 am on Oct 1, it should not show in October since nextDayThreshold is later in the day.

1reaction
arshawcommented, Jan 28, 2018

This has been very difficult to fix w/o a refactor, so here’s a workaround for now:

    eventRender: function(eventObj, el, view) {
      if (
        eventObj.start < view.start &&
        eventObj.start.time() < NEXT_DAY_THRESHOLD
      ) {
        return false;
      }
    },

https://codepen.io/arshaw/pen/LQPXQj?editors=0010

Read more comments on GitHub >

github_iconTop Results From Across the Web

FullCalendar - First day in Month View - Event spans from ...
However, the first day shown in the monthly view shows the spanned events from the previous day. These events don't display the time...
Read more >
nextDayThreshold - Docs - FullCalendar
When an event's end time spans into another day, the minimum time it must be in order for it to render as if...
Read more >
fullcalendar.js.list
For example, 48 hours will be "days" wherewas 49 hours will be "hours". // Accepts start/end, a range object, or an original duration...
Read more >
Events that go past midnight span two days on the calendar
Problem/Motivation Events that go past midnight span two days on the calendar Proposed resolution FullCalendar has a nextDayThreshold ...
Read more >
Multi day events cause the calendar to open to ... - Issue Tracker
In agenda view, if the current screen contains an event that spans multiple days, closing and reopening the calendar causes the view to...
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