In an application that displays a calendar of conferences, I had the need to have a yearly overview. I created a custom whole year view, where each grid cell is a whole month (see screenshot).
Here's a link to my fork:
https://github.com/monkbroc/fullcalendar/
Here's a link to a working demo:
https://rawgit.com/monkbroc/fullcalendar/year-view-demo/demos/basic-views.html
Reader, if you like the year view, please start this feature request!
I implemented this by implementing YearView as a subclass of BasicView and MonthGrid as a subclass of DayGrid (this is bad OOP, but it works...). MonthGrid overrides the places in DayGrid that are hard coded to assume that 1 cell is 1 day but otherwise leaves much of the functionality alone.
I understand that supporting this project is a lot of work for Adam and that adding a completely new type of view into the core is probably not going to happen any time soon.
As a first step, I would propose exporting DayGrid, i.e. making $.fullCalendar.DayGrid available the same way $.fullCalendar.Grid is available. I would also propose to export more methods of the util.js file to allow developers to create custom views that use some of those methods (distributeHeight and undistributeHeight would help for custom views).
That would allow me to manage my YearView and MonthGrid classes separately from the main FullCalendar repository. The burden would be on me to fix them when the implementation of BasicView and DayGrid changes.
If you agree to this small API change (export DayGrid and a couple helper methods), I can submit a pull request.
If this view is useful enough for other people, I volunteer to refactor DayGrid into DateGrid where each cell represents an interval of time. DayGrid and MonthGrid would then be derived from DateGrid. This is obviously a bigger change, but it's worth discussing.
Julien
Labels: Type-Feature
Mergedinto: 2260