Hi,

I am really loving Full Calendar and was thinking it would be really great to have a mini calendar block that mimics what the calendar module does. I initially made a block display for my full calendar, but it doesn't look as mini or clean as the calendar module one, because the titles take up too much space and make the calendar very long.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett’s picture

There was some discussion of this here: #1175868-18: Provide minicalendar block that links to the calendar page

See http://philorch.org which accomplishes this with FullCalendar and custom code.

beckyjohnson’s picture

Thanks for the info. Going to try to figure this out. Not sure where to start though.

beckyjohnson’s picture

I found this: http://wowmotty.blogspot.com/2011/04/fullcalendar-mini-sized.html maybe it will help some other people.

westis’s picture

Any updates as on how to create a minicalendar block á la philorch.org? Would need a mini calendar for a footer & sidebar block.

Zythyr’s picture

Issue summary: View changes

I agree. We would love to have a mini version of the FullCalendar that can be used as a block.

subhojit777’s picture

I tried to create the mini calendar using block display, and then placing the block in sidebar. Visually I don't see the calendar widget, but I see that the relevant HTML has been loaded in page source. There is nothing in the logs (including browser) either. I am not sure how to debug this issue. I am using the 8.x version.

subhojit777’s picture

Version: 7.x-2.x-dev » 8.x-1.x-dev
FileSize
1.25 MB

Here's what I am seeing. Bumping the version too. This looks like more like a bug, not sure this should be kept as feature request.

subhojit777’s picture

Did some more debugging today and found a couple of issues.

  1. When placed as a block, the required JS were not loading. I had to explicitly load them using hook_page_attachments_alter()
  2. Looks like the library is not able to properly hook into the HTML and therefore the widget is not appearing

Second point elaborated:

This is the HTML where the widget is not appearing - as block.

This is the HTML where the widget is appearing - as page.

Not sure what is causing the problem. Any help is greatly appreciated.

subhojit777’s picture

After investigation I found that the DOM is not able to hook into the fullcalendar library. And this is happening only for block.

I found that this this.$calendar.find('.fullcalendar').once().fullCalendar(this.$options) inside web/modules/contrib/fullcalendar/assets/js/fullcalendar.library.js is getting executed before the block is rendered.

subhojit777’s picture

Ok. I found that the issue in #9 was happening due to bigpipe. I uninstalled the module, and DOM hooked into the fullcalendar library fine.

subhojit777’s picture

u_tiwari’s picture

Patch #162 here https://www.drupal.org/project/drupal/issues/1988968 seems to fix this issue mentioned in #6