I have created a custom SharePoint list definition. My template is a generic SPListItem. Each item has start and end values.
Now I have been given the requirement that I need to display the items in a calendar view. For this I have created following view for my list:
<View BaseViewID="3" DisplayName="$Resources:Calendar;" Type="CALENDAR" ImageUrl="/_layouts/images/generic.png" XslLink="main.xsl" WebPartZoneID="Main" WebPartOrder="1" Url="MyCalendar.aspx" SetupPath="pages\viewpage.aspx">
<Toolbar Type="Standard" />
<XslLink Default="TRUE">main.xsl</XslLink>
<JSLink>
</JSLink>
<ViewFields>
<FieldRef Format="TimeOnly" Name="ActivityStartTime"></FieldRef>
<FieldRef Format="TimeOnly" Name="ActivityEndTime"></FieldRef>
<FieldRef Name="ActivityProject"></FieldRef>
</ViewFields>
<Query>
<OrderBy>
<FieldRef Name="ActivityStartTime" Ascending="TRUE"></FieldRef>
<FieldRef Name="ActivityEndTime" Ascending="TRUE"></FieldRef>
</OrderBy>
</Query>
<Toolbar Type="Standard" />
<XslLink Default="TRUE">main.xsl</XslLink>
<JSLink />
</View>
The only problem with this approach is, I cannot get the "New event" button to show up if I hover over a day cell in month view.
If I create a event list in Sharepoint I get expected results. But if I use my custom list with a calendar view it doesn't. Does anybody know what I'm missing here?