Reputation: 3329
I'm using fullcalendar 1.6.4 in conjunction with a Drupal 7 site; all is well except that I'm getting the wrong number of weeks for some months with weekMode set to "variable" or "liquid". For September 2013, I get four rows of weeks, which means that I lose the last two days of the month. Most other months appear correctly, although December 2012 is shown with 5 weeks (losing the 30th and 31st), and January, February, and October 2013 are all shown with 6 weeks (one more than is needed).
I've been doing some quick hacking around with the render()
code where the starting and ending dates seem to be worked out, but haven't come up with anything clearly better. So: are other people seeing this / is it a known issue / have I screwed up something with my installation? Thanks!
Upvotes: 1
Views: 519
Reputation: 7135
This is not a Full Calendar bug, but instead a bug in the Drupal implementation of Full Calendar. Drupal allows users to override the "start of the week" option (values of 0 to 6). Drupal is incorrectly storing this value as a string instead of a number.
Upvotes: 0
Reputation: 3329
I think there's a bug here: in fullcalendar.js's MonthView.render()
, it looks like the AddDays
computation of visEnd (l. 1984) is getting messed up by firstDay
getting string-concatenated into the value instead of added. visStart
may be getting similarly affected, since it does pretty much the same thing. In any case, I stuck the line firstDay = parseInt(firstDay, 0)
after the var FirstDay...
statement, and things are working properly for me. This may not be the preferred way of handling the matter, but I think something like this is going on. Opinions from other eyes?
Upvotes: 1