I had planned to publish this week a script for calendar views. But during my tests, I uncovered a couple issues… not with my script, but with SharePoint itself.
So I have decided to share my findings. I am looking forward to your feedback, to confirm the issues or share other issues you have found with calendars.
Note: I’ll update this ongoing list as and when more issues are identified.
Issue 1: tasks missing in month view
Test:
– 3 tasks in a standard tasks list:
Task1 Start Date:11/10/2008 Due Date:11/19/2008
Task2 Start Date:11/6/2008 Due Date:11/12/2008
Task3 Start Date:11/10/2008 Due Date:11/14/2008
– Month view: displays the title, from start date to due date
Issue: task1 is not displayed correctly in the month view. It seems that because task2 starts before task1 it overwrites it. Note that there is no option in the calendar view to reorder the tasks. The week and day views are fine.
I haven’t found mention of this issue on the Web.
Issue 2: error on calculated start time for full day event
Test: in a list of type calendar, create a calculated column with the formula:
=[Start Time]
Issue: for full day events, the calculated value is earlier than the start date (off by a few hours, which means that it actually shows the previous day). I searched the Web and found that others were reporting the same issue.
Issue 3: calculated start date in calendar views
SharePoint throws out an error message when you try to use a calculated date as start date in a calendar view.
Thanks to Sue Hanley for pointing this out.
Issue 4: alerts
for full day events, the date and time in the alert is off by a few hours.
Issue reported on the STP forum.
And a couple notes…
Two other issues with calendar views are referenced on the Microsoft support site:
http://support.microsoft.com/kb/883973/
http://support.microsoft.com/kb/871145/
In addition to these issues, note this “behavior”: for recurring events, the “Start Time” column doesn’t store the start time of the occurence, but the start time of the series (which btw may be earlier than the start time of the first occurence).
If for example you look at the Start Time column here:
http://8002.freesharepoint2007.com/Lists/Calendar/MyItems.aspx
What is displayed is correct, but it is not the actual content of the “Start Time” field. This can be a trap if you want to use “Start Time” for filtering or in a calculated column.
And, for the record: I have already reported this oddity with the month view.
P.S.: as I mentioned here, my draft script is available for testing, just contact me by e-mail if you are interested in a copy.
Update [11/16/2008]: the script is now available here.
I’m afraid I can’t explain Issue 1 yet, but I was able to recreate it with an additional oddity, which may or may not have happened to you (maybe it did, but you didn’t mention it.)
I noticed that on the month view, Task1 doesn’t show as starting until 11/16. This leaves four days from the end of Task2, and two from the end of Task3. I find it interesting that, if an overlap problem is indeed the cause, Task1 doesn’t show as starting immediately after Task2 ends.
Very strange. I’ll play around myself, but am interested in a cause.
I haven’t seen your issues yet, but I’ve got another issue with Calendar views. I am creating a Calculated field where the result is a Date (I’m calculating 180 days prior to the date entered by the user). The goal is to display this calculated date in a calendar view because the user needs to take action 6 months before the entered date. The problem is that I get an error when I try to use the calculated date in a calendar view. My calculated date acts like a date in all other calculations and views, but it gives a nasty error message when I try to use it in a calendar view. We’ve tested this on multiple SharePoint instances and the error seems to be the same everywhere. Could this be at all related to the same issues you are seeing?
Brian: this is the issue I see. It is not related to a number of days but to the week. I assume SharePoint builds the month calendar row by row, so the display is correct if there is no overlap for a given week.
Sue: I tried your example and got the same issue. I’ll add it to the list.
Good to know, thanks 🙂
Btw I haven’t figured out the preferred way to report the issues to Microsoft. Any help appreciated!
Pingback: SharePoint calendars: color coding, hover effects, etc. « Path to SharePoint
ISSUE #2
I can partially explain what’s happening on issue number 2, where calculated date columns display one day earlier for all-day events.
When you create a new appointment and check “All-Day Event”, the time disappears. However, if you re-open the item after creation, the Start Time displays as 12:00 AM and the End Time as 11:59 PM.
Create a START column =[Start Time] and an END column =[End Time], and then view the entire item. My calculated columns are both exactly 5 hours earlier than their respective sources, but yours may be different because …
My time zone is (EST -05:00). Coincidence? Maybe not. I tried out this theory on a test server, where I changed the time zone on both the web application and the server. But the difference was still -5 hours in the calculated fields, even after both an iisreset and a reboot.
I finally gave up and calculated START as “=[Start Time]+5/24”, which seems to work … so far.
I’m new to Sharepoint and ran into the same problem where an All Day Event actually shows the Start Date & Time as the previous day. This is only in the list view. It appears correctly on the calendar view. To correct the list view I used Campbell’s solution above and it worked like a charm! Thanks.
Campbell: in my tests, the time difference was not the same in Winter and in Summer, so you may need to take into account the daylight saving time…
USE:
=IF(TEXT([End Time],”hh:mm AM/PM”)=”06:59 PM”,
TEXT(TRUNC([Start Time]+1,0),”ddd mm/dd”)&” All Day”,
IF(TEXT([End Time],”hh:mm AM/PM”)=”07:59 PM”,
TEXT(TRUNC([Start Time]+1,0),”ddd mm/dd”)&” All Day”,
TEXT([Start Time],”ddd mm/dd hh:mm AM/PM”)
)
)
Change the 6:59 PM & 7:59 PM for your TZ and DST adjustments.
Create some sample items to get your exact UTC/DST offsets. Stupid but that is SharePoint!
You can’t add this to the site columns and site ‘event’ content type because the fields are renamed and not available (It crashes) you have to add this to EVERY stupid instance of your calendar.
Ouch. You’re right. Thank you Christophe. I don’t relish tinkering in all of the calendars that use those columns twice a year.
As far as I can tell, SharePoint outputs its default date columns in an ISO format, which includes the time zone. However, the calculated dates are simply returned as mm/dd/yyyy, which SharePoint seems to assume is GMT and unnecessarily adjusts the time zone a second time.
I’ve seen some pretty complex calculations out there and I guess I’m going to have to dig through them after all.
I sure hope Microsoft tweaks this in SP2. And of course, that will break all of my custom columns …
I just came across this post:
http://parkesy.wordpress.com/2007/02/02/sharepoint-calendar-missing-events-problem/
The post itself is old, but the last comments are not. Thanks for sharing if you have more details on this issue.
Have you already solved the Problem with the dayLight saving in your date calculation?
Thanks
PANVEGA, could you please elaborate?
Ok, Sorry, I think it wa Campell above, who wrote the approach with “=[Start Time]+5/24”. However I still have the problem with the DTS daylight saving. In Germany GMT+1, now however summer time +2 hours. First I wanted to use the calculation field with a IF statment, but it did not work.
Another issue came with the Calculatoin field Start Time]+5/24]. In my Calendar you can set the value “All Day Long” with you want. However if not enabled and using a exact time for Start and End Event, the hours from the calculatoin field were add as well.
All Day Long enabled: I set 5:30 for ending, the calculation field sets the value to 10:30.
So I tried a formula:
e.g. =IF([All Day Event]=1;[Start Time]+5/24];[Start Time])
The problem here is that All Day Event could not be choosen from the list and i receive an error message.
Do you have any idea?
Thanks
Thanks
I haven’t done anything on this. I use lists of type calendar when I have recurring events to manage, and in this case “Start Time” is meaningless.
Hi everybody,
Can’t we update the “End Time” field value in calendar list? I tried to update that value throuh code but it throws an exception stating that invalid data to update the fields or field may be readonly.
My scenario is as follows:
I have two calendar list items and i am merging old items with the new items so end date should be the date of new item end date.
Is there any way to update the field
Intekhab
Update the end date and start date same time using item.update(); here item is the splistItem.
Regards,
Intekhab
Hi Christophe,
I am getting an issue with calendar which is reported in http://support.microsoft.com/kb/871145/
I want know if there is any way to increase this limit of 1000 events in calender month, keeping the recurrence on?
Regards,
Santanu
Hi Christophe,
I’ve setup your HTMLcc on a calendar view and it works just fine for the month view. However, when I switch views to a week or a day, it just displays the HTML and not the color. How do I fix that?
Many thanks again!
Matt
Matt, are you displaying sub-headings in your week and day view? If so, try this:
find the following line in the code:
var regexpA = new RegExp(…
and remove the last $
You called it! Fixed the script and it works great! Thanks for your insight…
Hi,
We are using calendar list in sharepoint. We have one issue with date.
This calendar works fine on root site but on variation sites it shows each date twice in calendar like 21 (21) onstead of just 21.
I’m a newcomer to Sharepoint but one of the requests for my group was to set up a calendar for absences with color coding. I am still working to apply Christophe’s web part and scripts, but in the mean time I have been fiddling with the display of all day events. Despite staff in many different time zones, having weekly or monthly entries span two days on the calendar was considered unacceptible.
I managed in my workflow to kludge it. FIRST I set the workflow variable end date to retain the proper end date, with a fixed time of 11:50 hours. Then I set the workflow variable start time (which was being set back -1 to 12 hours for GMT) ahead 13 hours to get the start date portion right, then to the fixed time of 00:00 for the time portion.
On updating the record Sharepoint does adjust the start and end times of my record foward for GMT, but does not recalculate the end time from my fixed 11:50 time, thus leaving me still short of 23:59. The times are not useful, but they are also for all day events not used.
Thanks for sharing Elena!