Omicron Llama

Coding all day, every day.

Year-to-View with Sharepoint Calendar BugFixed!

“Suji” has helpfully informed me that my previous post about a Year View of the Calendar had a bug in it.

To view the original post:
http://e-junkie-chronicles.blogspot.com/2009/07/year-to-view-with-sharepoint-calendar.html
The bug is that if an event were to span 2 months (ie: Starts September 30th and Finishes October 2nd) then the view would ouput only under the “September” column the data “30-2”.
A quick and easy test of startDate.Month comparing to endDate.Month can see if the event spans 2 months or more, and if it does, then simply write the startDate.Day in the correct column indexed by startDate.Month , and the endDate.Day in the same way, indexing the correction column with endDate.Month.
Simples! x

Leave a Reply

Your email address will not be published. Required fields are marked *