Wednesday 26 June 2013

Full Calendar Printing Issues

The Full Calendar has a thread with issues regarding printing the calendar.

https://code.google.com/p/fullcalendar/issues/detail?id=35

A Squashed Saturday Column

I was required to have a fluid layout where the width of the calendar region is 50% of the page, but there is a problem, the Saturday column appears squashed.

I have found 2 ways to fix this issue:

1. Give the width a static width rather than fluid, but in my case this doesn't meet the requirement.

2. Use a tiny bit of jQuery to set the width from fluid to static. You can run this on load, before printing, on page resize etc. For me I just needed to run this on page load.

Region Template
Give the Calendar a Region a Static ID so we can select the region supporting the calendar (not the calendar).

Page Onload
$(''#REGION').width($('#REGION').width());

It simply gets the pixel value of the region and sets it overwriting fluid.

And your print will now look like the following:



I have no doubt there a lots of way to achieve this but I found this the easiest.

All we need now is Full Calendar PDF Printing :)


Thursday 20 June 2013

FullCalendar vs APEX Default Calendar Plugins

The full calendar plugin developed by skillbuilders legend Dan Mcghan takes the jQuery Calendar developed by Adam Shaw to a near seamless integration into APEX.

The main benefit for me vs Oracle APEX default Calendars is the 'out of the box' spanning of events over multiple days.

For example, if I had a calendar entry with the following:
Start Date: 1/3/2013
End Date: 7/3/2103

The APEX default Calendars / Plugins would only display 1 entry (the start or end date respectively).

This is where the Full Calendar shows its strength (Calendar entries spanning multiple days).
Its also exceptionally easy to integrate tooltips and custom colours.

I don't think it will be long before Oracle produce a Sample Calendar Plugin which satisfies this as they have already done this with the Gantt Chart in the Sample Calendar Application.

 
 

Time is of the essence and all that :)

The only negative is printing the full calendar... which I will discuss in my next blog.