My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 161: show only a range time in week agenda
1 person starred this issue and may be notified of changes. Back to list
Status:  Duplicate
Merged:  issue 158
Owner:  ----
Closed:  Nov 2009


Sign in to add a comment
 
Reported by rpestana...@gmail.com, Nov 3, 2009
Are any config. to show only 6 am to 23 pm?

Thank you for your help.


Nov 3, 2009
#1 mcpata2...@gmail.com
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) : '&nbsp;') +
      "</th><td class='fc-slot" + i + ' ' +
      tm + "-state-default'><div>&nbsp;</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),

Nov 10, 2009
Project Member #2 adamrs...@gmail.com
thanks mcpata2002. i will reference this code when putting the feature in the
release. nice coding.
Status: Accepted
Nov 10, 2009
Project Member #3 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Duplicate
Mergedinto: 158
Sign in to add a comment

Powered by Google Project Hosting