My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2456: Whole year view
1 person starred this issue and may be notified of changes. Back to list
Status:  Duplicate
Merged:  issue 2260
Owner:  ----
Closed:  Apr 2015


Sign in to add a comment
 
Reported by jvan...@gmail.com, Mar 5, 2015
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
YearView.png
44.0 KB   View   Download
Apr 19, 2015
Project Member #1 adamrs...@gmail.com
Thanks for the write-up! There is already a similar ticket open for this feature, which I will merge this ticket into. But I will keep record of this. Thanks!
Status: Duplicate
Labels: Type-Feature
Mergedinto: 2260
Sign in to add a comment

Powered by Google Project Hosting