| Issue 161: | show only a range time in week agenda | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Are any config. to show only 6 am to 23 pm? Thank you for your help.
Nov 10, 2009
thanks mcpata2002. i will reference this code when putting the feature in the release. nice coding.
Status:
Accepted
Nov 10, 2009
(No comment was entered for this change.)
Status:
Duplicate
Mergedinto: 158
Jul 14, 2014
there are settings to achieve that: http://arshaw.com/fullcalendar/docs/agenda/minTime/ http://arshaw.com/fullcalendar/docs/agenda/maxTime/ |
|
| ► Sign in to add a comment |
A lazy initiative to modify fullcalendar.js for this issue, look at the firstVisHour and lastVisHour. Issue to fix: 1/ height is calculated by width / aspectRatio, should use height of visible rows. 2/ events outside the display time will lead to problem. 3/ drag / resize to end of day will have display problem. 4/ event across day end will have display problem. Modifications: Near line 1328 setDefaults: setDefaults({ allDaySlot: true, allDayText: 'all-day', firstHour: 6, firstVisHour: 0, lastVisHour: 23, slotMinutes: 30, Near line 1500 changes body generation: // body d = zeroDate(); s = "<table>"; for (i=0; d.getDate() != 2; i++) { hours = d.getHours(); if (hours >= options.firstVisHour && hours <= options.lastVisHour) { minutes = d.getMinutes(); s += "<tr class='" + (i==0 ? 'fc-first' : (minutes==0 ? '' : 'fc-minor')) + "'><th class='fc-axis fc-leftmost " + tm + "-state-default'>" + ((!slotNormal || minutes==0) ? formatDate(d, options.axisFormat) : ' ') + "</th><td class='fc-slot" + i + ' ' + tm + "-state-default'><div> </div></td></tr>"; } addMinutes(d, options.slotMinutes); } s += "</table>"; Near line 2175 function timePosition() var slotMinutes = options.slotMinutes, minutes = (time.getHours()-options.firstVisHour)*60 + time.getMinutes(), slotI = Math.floor(minutes / slotMinutes),