1
votes

I have the following event on FullCalendar:

{ title : "My Meeting" , start : "2015-04-15T08:00", end : "2015-04-17T17:00" }

So my event starts on April 15th, and it ends on April 17th, and happens on each day from 8am to 5pm. But FullCalendar shows the event in week and day view as if it happens non-stop from April 15th at 8am to April 17th at 5pm. Like this:

  • April 15th: 8am to 12am;
  • April 16th: 12am to 12am;
  • April 17th: 12am to 5pm.

I want the event to span those 3 days, but only to show from 8am to 5pm on each day for the week and day view. Like this:

  • April 15th: 8am to 5pm;
  • April 16th: 8am to 5pm;
  • April 17th: 8am to 5pm.

Can this be done? How should I set my event properties to achieve this?

1
In what view? It will only show the exact times in an agenda view, not in month viewDanielST
In both week view and agenda view, it shows the incorrect times. It shows the non-stop times, instead of 8am to 5pm on each day it spans.kevin
I'll need to see the rest of the fullcalendar code you are using. You must have some setting turned on that's causing this, since it's not the default behaviour. Make a JSFiddle or post your code here.DanielST

1 Answers

0
votes

You have to use an eventConstraint dow (Day Of Week) see the documentation

Example:

             var event = [{
                title: "My repeating event",
                start: '10:00', // a start time (10am in this example)
                end: '14:00', // an end time (2pm in this example)
                dow: [1, 4], // Repeat monday and thursday
                ranges: [{start: "2017-07-01", end: "2017-07-15"},]
            },
            {
                title: "My repeating event 2",
                start: '10:00', // a start time (10am in this example)
                end: '14:00', // an end time (2pm in this example)
                dow: [1, 4], // Repeat monday and thursday
                ranges: [{start: "2017-08-01", end: "2017-08-15"},]
                }
            ];