I am working on SharePoint 2010 Calendar. By default the Start Date and End Date fields are required in Event Content Type. I made both of these fields optional. When I add an Event to the Calendar, with blank Start and End Date the Event gets saved without any problem. When I edit the Event, do nothing and click on save, exception occurs.
Object reference not set to an instance of an object.
[NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.SharePoint.WebControls.DateTimeField.GetDateValue(DateTimeField fieldControl) +128
Microsoft.SharePoint.WebControls.DateTimeField.Validate(Boolean validateMemberControl) +474
Microsoft.SharePoint.WebControls.DateTimeField.Validate() +44
System.Web.UI.Page.Validate() +117
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +105
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
I do not have any custom code.