Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#8 | Screenshot 2019-01-08 at 3.09.25 PM.png | 60.13 KB | subhojit777 |
#8 | Screenshot 2019-01-08 at 3.05.26 PM.png | 53.08 KB | subhojit777 |
#7 | test.gif | 1.25 MB | subhojit777 |
Comments
Comment #1
tim.plunkettThere 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.
Comment #2
beckyjohnson CreditAttribution: beckyjohnson commentedThanks for the info. Going to try to figure this out. Not sure where to start though.
Comment #3
beckyjohnson CreditAttribution: beckyjohnson commentedI found this: http://wowmotty.blogspot.com/2011/04/fullcalendar-mini-sized.html maybe it will help some other people.
Comment #4
westis CreditAttribution: westis commentedAny updates as on how to create a minicalendar block á la philorch.org? Would need a mini calendar for a footer & sidebar block.
Comment #5
Zythyr CreditAttribution: Zythyr commentedI agree. We would love to have a mini version of the FullCalendar that can be used as a block.
Comment #6
subhojit777I 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.
Comment #7
subhojit777Here'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.
Comment #8
subhojit777Did some more debugging today and found a couple of issues.
hook_page_attachments_alter()
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.
Comment #9
subhojit777After 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)
insideweb/modules/contrib/fullcalendar/assets/js/fullcalendar.library.js
is getting executed before the block is rendered.Comment #10
subhojit777Ok. I found that the issue in #9 was happening due to
bigpipe
. I uninstalled the module, and DOM hooked into thefullcalendar
library fine.Comment #11
subhojit777Created issue #3025696: JavaScript executed before block is rendered
Comment #12
u_tiwari CreditAttribution: u_tiwari commentedPatch #162 here https://www.drupal.org/project/drupal/issues/1988968 seems to fix this issue mentioned in #6