I have successfully converted the FullCalendar into asp.net / VB and it works perfectly. I am struggling to change the background colour of an event based on a SQL query. I have tried many of the links on StackOverflow and on the Full Calendar Docs – http://arshaw.com/fullcalendar/docs/event_rendering/Colors/ but I have barely any knowledge of jQuery/Javascript so this is proving very difficult for me.
I have 5 Employees and I would like each of them to have a unique colour on the Calendar. In my SQL table there is a SalesPersonID field for each employee. I want to change the colour based on the ID. e.g.: (I know this will not work in this scenario, it is purely for info)
If "SalesPersonID" = "1" Then
cevent.className = "Steve"
ElseIf "SalesPersonID" = "2" Then
cevent.className = "Bob"
End If
I have uploaded my code here – http://www.2shared.com/file/XtSva9Zp/FullCalendar_ASP_NET_VB.html
Please feel free to download and dissect it to see if you can help me!
Another guy on StackOverflow has posted this link which may help…
http://jake1164.blogspot.com/2010/07/adding-dynamic-color-to-fullcalendar.html
Thanks
I had a similar issue and I narrowed it down to the fact that my database stores case-insensitive column names, so when I exported my events and tried to render them, my event objects had the property
event.classnameinstead ofevent.className. Fullcalendar only uses the camel-case version, so my css would never render.I made a wrapper object in my php to change the lower-case property into a camel-case property and fullcalendar is now recognizing the className property.
Hope this helps.
Andy