2010 Calendars won’t print in IE7

So your SharePoint site is using the new v4 UI, everything looks slick and pretty.  But wait, you work in an environment where you have to support IE7 and your calendars won’t print properly.  Given the popularity of SharePoint, especially among all of the large companies and the public sector, it shouldn’t be surprising that not everyone can just upgrade IE just because the calendar is broken as suggested here:

http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/1d2555fe-f0aa-467b-8d2b-6732b5da52a4/

I find myself in that very situation and I’m hoping that I can offer a fix (or a start to one as its not the prettiest).  The end of the technet posting suggests that the issue lies with calendarv4.css found in the hive.  I decided to devote a few hours to digging in with the IE developer tools (both IE7 and IE9).

I assumed that this was probably one of the usual IE7 bugs with  haslayout and all the above so I started there.  I tried everything from zoom to height, to changing the display to no avail.  So lets assume that the calendar items are on the printout (but off the page).  A little absolute positioning some and I could get it to show up, but not on the calendar grid.  Slowly I tweaked it and saw the items disappear behind.  Maybe z-index, nope, maybe if I float it, nope.  Finally I decided to toss the style-sheet into the w3 validation tool.  Hey, there’s an error with overflow-x…overflow could cause the items to clip improperly and there are overflows all over calendar v4.  Why not mess with that.

Finally I was able to find something that would work.  I started out throwing the anvil at it

body *
{
overflow:visible !important;
}

Hey it worked, but I don’t want to have it affect anything outside the calendar. After a little more digging I settled on:

<style type="text/css">
@media Print
{
  .ms-acal-rootdiv * {
    *OVERFLOW: visible !important
  }
  .ms-acal-item {
    *OVERFLOW: hidden !important
  }
}
</style>

Toss that in however you prefer (content editor web part, additionalpagehead UserControl or what have you) and voila, you can print 2010 v4 calendars in IE7.

I pretty much stopped as soon as I had something that worked and was isolated to the calendar blocks, so this could be tuned more to find the actual style that breaks in IE7, but that’s more time than I want to devote to this.

5 thoughts on “2010 Calendars won’t print in IE7

  1. Thank you very much for this, it seems to *almost* work great. When I tested this on an IE7 machine, the calendar items did print, but they were shifted by a half day, so it looked like my event was over two days instead of just one. Have you run into that issue?

Leave a Reply