im looking for way how to change start/end day of day.
For example: day start at 7am and end at 7am next day. In short i need to force calendar thinking day start and end +7hours
Any idea?
Look at nextDayThreshold
"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."
$('#calendar').fullCalendar({
nextDayThreshold: '07:00:00', // 7am
...
});
Related
How do I go about displaying a long-running event with no end date? The data provided to me only shows when the event started but no end date because it's set to "Forever". It appears that when I only provide the start option, it only sets the event to show up on that day and not the following days.
I have a possible workaround for this, where if there is no end date from the event source, I always set the end date to 24 months from today, but that means if someone navigate the calendar past 24 months, the event would appear to have ended then. Would be nice to have something that will just keep going forever.
I realise that by design it's intended that fullcalendar endDates are exclusive, but I'm looking for help to work with that given my constraints.
Data stored is simple UK date format:
YYYY-MM-DD
start: 2015-01-18
end: 2015-01-19
I'd like to keep the look of the plain all day events, rather than the timestamped style and I cant just +1 end date as what happens come the end of the month?
I've tried poking through the source js, to remove any -1 corrections in there. That works for my multiday events, but then makes one day events look like two day events.
Scenario. Users select a start date and end date (of their holidays)
So that would be perhaps monday to friday. Users dont select a time, just the date. Naturally they'll select the dates they want for holiday as inclusive.
Expected behaviour.
18/1/2015 - 18/1/2015 would highlight one full day.
18/1/2015 - 19/1/2015 would highlight two full days (inclusive days)
18/1/2015 - 20/1/2015 would highlight three full days (inclusive days)
etc..etc
Actual behaviour.
18/1/2015 - 18/1/2015 will highlight one full day.
18/1/2015 - 19/1/2015 will highlight one full day (exclusive endday)
18/1/2015 - 20/1/2015 will highlight two full days (exclusive endday)
Open to suggestions, fixes, workarounds, dirty hacks.
Thanks
It's possible I'm misunderstanding, but here's a possible solution.
Inside of eventDataTransform (which is called for every event), add a time to each start and end date. Something like
eventDataTransform: function(eventData){
eventData.start.startOf('day');
eventData.start.endOf('day');
}
Thanks to slicedtoad for the hint with eventDataTransform. I just had to find the correct way to actually add 1 to the end date. For any one curious (and I'm not sure I fully understand how it works), but a one day event is still a one day event even though it appears we're add one to the end?
events:
{
url: '<?php echo base_url();?>index.php/jsonfeed',
error: function()
{
alert('error');
},
},
eventDataTransform: function(eventData)
{
eventData.end = moment(eventData.end).add(1, 'days').format();
return eventData;
},
I'm using the fullcalendar plugin and would like to modify the agendaWeek type display days from 07:00-06:59 instead of 00:00-23:59.
With
minTime: '07:00'
I can get the day to start at 07:00 but maxTime won't make the day last longer than 23:59.
Is there any simple solution to this problem?
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.