How can I display half-a-day events in a slot duration of 1 day?
slotDuration: {days: 1},
I tried to set the duration to 12 hours but then the view gets very cluttered caused by the double weekday name and the shown time. My goal is it to keep the view as clean as possible.
Related
may I ask and need your help also. I am using a full calendar plugin latest version of v3.8.0. I create an event which is the start date is 2018-01-16 23:59:00 and the end date is 2018-01-17 08:00:00 (11:59pm - 8:00am) . The event is plotted only on 1 box which is the day of 16, but when is set it at 2018-01-16 23:59:00 and the end date is 2018-01-17 09:00:00 (11:59pm - 9:00am) the result is set 2 box from 16-17 day.I'm having a hard time on setting this time format for this plugin.
I assume you're talking about the "month" type of view, because this is the only situation where this behaviour occurs. It doesn't make any logical sense in the other view types.
Anyway, this behaviour is controlled by the nextDayThreshold setting. When an event's end time spans into another day, this option controls minimum end time it must have in order for it to be rendered onto that day. The default value is 9am
This can be useful if you have an event which ends in the early hours (e.g. a party) but you don't want people to confused into thinking it takes place the next evening, or runs over into the normal working day or something.
In your case, if you wanted your event to appear, you could set the threshold earlier, for example 7am, in order to change the behaviour:
nextDayThreshold: '07:00:00'
Here are two working demos showing you the difference when you change the threshold:
Default behaviour:
http://jsfiddle.net/sbxpv25p/93/
With nextDayThreshold set to 7am:
http://jsfiddle.net/sbxpv25p/94/
See https://fullcalendar.io/docs/event_rendering/nextDayThreshold/ for more detail about this option.
I am trying to incorporate FullCallendar in one of our application to show events. Now I am facing a problem with business hours. In the month view it is showing wrong end date (one day less than actual) if any event ends before 9 am. So for example, say I have two following events
Event 1: Start date&time : 2016-11-09T10:00, End date&time : 2016-11-20T17:30
Event 2: Start date&time : 2016-11-09T10:00, End date&time : 2016-11-20T08:30
In this case in the month view, Event 1 is covering all dates from 9 to 20, however Event 2 is covering dates from 9 to 19.
I tried in Google with this issue and found following link
How to set the business hours
But it does not solved the issue. I want to disable business hours. I tried by setting it false. But nothing happen.
Please help
Please use nextDayThreshold option in full calendar
nextDayThreshold: '00:00:00'
for more information:
https://fullcalendar.io/docs/event_rendering/nextDayThreshold/
I have training events from database and their start and end dates are in this format "YYYY-MM-DD". For example is:
{
'title':'English Training',
'start':'2015-05-19',
'end':'2015-05-23'
}
But when it is rendered in calendar, it shows wrong end date
I tried adding 12hours on endDate (*just like the answer * here) , and yes it works but now I'm unable to extend the day for an event.
I want to fix this wrong end date issue without losing the capability to extend events. Do you know any solution or hacks?
Adding 12 hours on the endDate of your event won't make it an allDay event anymore, which is why you will loose the ability to extend your event in month view.
However, adding 1 day on the endDate will work perfectly as :
Your event will remain an allDay event (so it will remain extendable)
Your endDate will become 2015-05-24 (understood by FullCalendar as 2015-05-24T00:00:00) which means that your event will end at the very first minute of 2015-05-24 which is what you want.
To conclude : if you want an allDay event to end at midnight of day1, you have to set its endDate as day2 !
I have a problem with the fullcalendar, I have an event that occurs on day 3 and day 4, when a event ends before 9am, the month mode is shown only one day, look:
Week: (ending before 9am)
Month:
Week: (ending after 9am)
Month:
How I fix it? I want to show the event in the Month on both days.
You need to change the nextDayThreshold properties to another hour for the event to display according to your needs.
From the docs:
When an event's end time spans into another day, the minimum time it must be in order for it to render as if it were on that day.
Duration, default: "09:00:00" (9am)
Only affects timed events that appear on whole-days. Whole-day cells
occur in month view, basicDay, basicWeek and the all-day slots in the
agenda views.
Example (docs)
{ start: '2014-02-04T20:00:00', end: '2014-02-05T02:00:00' }
// goes from 8pm to 2am the next day
More info at:
http://fullcalendar.io/docs/event_rendering/nextDayThreshold/
In Fullcalendar, I want to disable the days which out of the current month.
For example , maybe these days are the last month days or next month days. I want to disable them, who can tell me how to make it to be disabled?
And how to disable the range of time in one day, For example , to disable 6:00AM-8:00AM.
To disable the days which are out of the current month, there's a CSS class on those days "fc-other-month" which you could either use some CSS or JQuery/javascript to disable the events dayClick and eventClick. To work with the time range, the documentation has a minTime: http://arshaw.com/fullcalendar/docs/agenda/minTime/ and maxTime: http://arshaw.com/fullcalendar/docs/agenda/maxTime/ to work with, but these will apply to every day in your calendar, not a specific day. You could always add an event yourself during that timeframe for a specific day and set the attribute: editable to false.