| Issue 2541: | option to set a day break time for TimeGrid | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Setting the new option dayBreak to for example "07:00" or "7:00 AM" will make the day columns in TimeGrid views start at 7 am in the morning and extend past midnight, ending 7 am the following day. This can be useful for TV-listings or concert/club event scheduling were it's common to have "days" ending past midnight.
This is accomplished with two small code changes.
1) Make sure we actually use the seg column date as the startOfDayDate property in computeSegVerticals() instead of the seg event start date. [2 changed lines in TimeGrid.events.js]
2) Add a dayBreak option which overrides the minTime and maxTime values to make the columns render past midnight. [3 added lines and 2 changed lines in TimeGrid.js]
(We can of course manually set minTime to "07:00" and maxTime to "31:00" if we don't want to add the dayBreak option, but I think this will be clearer for fullcalendar users)
Example;
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
defaultView: 'agendaWeek',
dayBreakTime: "07:00",
...
});
Jul 6, 2015
#1
matiasnu
Aug 2, 2015
(No comment was entered for this change.)
Summary:
option to set a day break time for TimeGrid
(was: Add an option to set a day break time in the TimeGrid (useful for TV-listings))
Status: Accepted Labels: Type-Feature
Aug 4, 2015
Pull request created: https://github.com/arshaw/fullcalendar/pull/257
Aug 20, 2015
Discussion for this issue has moved to the following URL: https://github.com/fullcalendar/fullcalendar/issues/2806 This is because Google Code is shutting down. Apologies if you are being pestered with these notifications. This is a one-time event. Happy coding, Adam
Status:
ExportedToGithub
Mar 7, 2016
I am using agendaWeek and I have done all code changes mentioned. My grid is showing time from 7am to 7am but when I create programs from 1am to 2am (after midnight), it is get cut in the grid. |
|
| ► Sign in to add a comment |