0
votes

I have made some modifications to FullCalendar. The gist of the mods are I now have 3 extra options...

  • monthBeginning (default 1) sets the beginning date for a month
  • monthAdvance (boolean default false) advances the month in t.title (explained later)
  • titlePrefix (string default '') used as a prefix to t.month

Basically I needed to display claims for Overtime. The company has a claim month starting on the 24th of each month. So my values would be

monthBeginning : 24, monthAdvance : true, titlePrefix : 'Claim Month: '

The result is a calendar starting from 24th Feb through to 23rd March. The title will be prefixed with Claim Month: and the the Month will be advanced so it reads March 2012 instead of February 2012.

enter image description here

So far so good. Now to the problem I have...

  • On first displaying the calendar instead of drawing this claim month (March) running 24th Feb to 23rd Mar it displays April running 24th Mar to 23rd Apr.
  • Clicking the Today button has no effect while in Claim Month April.
  • When in Claim Month March - Today is rightfully disabled and today's date is highlighted
  • When in any other month and Today is click it displays Claim Month April

My question is "which sections of code should I look at with regards to..."

  • How FullCalendar decides which month to display. It seems to be using a month value only and not a day/month which explains why I first get Claim Month April
  • The function used by Today to go to a particular month - again it seems to use a month and not a day/month

I will gladly share the modifications but I'm not sure what the policy is to publish the whole of FullCalendar.js as my mods are in several places.

1

1 Answers

0
votes

OK, I have answered my own question... In my implementation I have removed the next prev and today buttons. I have code which takes values from a dropdown on the page which are then used to display the calendar at the correct month using fullCalendars Year Month Date params.