I'm trying to create a custom calendar in a feature, but something is not working right. I am able to create events, but if I try to create a recurring event, I get an error. I'm using Sharepoint 2013 and trying to deploy my feature through Visual Studio 2012.
Steps to reproduce In Visual Studio
- Add New Item
- List
- Create a customize list template and list instance of it: a. Select "Calendar" in drop down.
- Deploy
A few odd behaviors I've noticed.
- Instead of the normal Calendar ribbon bar with "Events", and "Calendar", I get one with "Items", "List", and "Calendar".
- When I check the "Recurrence" check box, a Calendar created through the Sharepoint UI will auto fill the Start Date. In my Calendar, this field is blank by default. I am able to fill it in.
Here is the error message.
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: Value does not fall within the expected range. at Microsoft.SharePoint.WebControls.RecurrenceField.SetRecurrenceFields() at Microsoft.SharePoint.WebControls.RecurrenceField.CompleteItemLoad() at Microsoft.SharePoint.WebControls.SaveButton.ActionBeforeSaveItem(SPContext itemContext) at Microsoft.SharePoint.WebControls.SaveButton.SaveItem(SPContext itemContext, Boolean uploadMode, String checkInComment) at Microsoft.SharePoint.WebControls.SaveButton.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.FORM_ASPX_405394071.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\9251a794\cea24f96\App_Web_form.aspx_405394071.bveoxq2l.0.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)