locked
Recurring Event StartDate in SP Calendar edit form RRS feed

  • Question

  • We have an OOTB SharePoint calendar that is used for managing corporate events. Several new fields were added to the list so we created a custom edit form (editFormModified.aspx) in SP Designer. Recently a user reported that if they attempt to edit a series of recurring events the edit form does not contain the start date. This means they are forced to enter a new start date if they want to save their changes and lose some of the previous recurring events in the series.

    We have checked to confirm that the start date is saved correctly initially but not available in our custom edit form. If we open the same recurring event in the default edit form (editForm.aspx) the start date is visible.

    We included the recurring event field in the editFormModified.aspx:

    <tr>
        <td width="190px" valign="top" class="ms-formlabel">
            <H3 class="ms-standardheader">
                <nobr>Recurrence</nobr>
            </H3>
        </td>
        <td width="400px" valign="top" class="ms-formbody">
            <SharePoint:FormField runat="server" id="ff8{$Pos}" ControlMode="Edit" FieldName="fRecurrence" __designer:bind="{ddwrt:DataBind('u',concat('ff8',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@fRecurrence')}"/>
            <SharePoint:FieldDescription runat="server" id="ff8description{$Pos}" FieldName="fRecurrence" ControlMode="Edit"/>
        </td>
    </tr>

    I can also recreate this behavior in other calendars in our site collection by the following steps:

    1. Create a recurring event in SharePoint calendar
    2. Create a custom edit form in SP Designer
    3. View recurring event and select edit series (start date will not be visible)

    Does anyone know why this is happening or ways to correct this? So far we are unable to find any reason the start date would be empty in the edit form.

    Please note: I have also posted this question on SharePoint Stack Exchange but haven't gotten a response so I thought I would try elsewhere.

    Tuesday, April 22, 2014 1:53 PM

Answers

  • Hi,

    We can add the following code into the editForm.aspx page to solve this issue.

    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var startDate = $("input[title='Start Time']").val();
            $("input[title=' When this event begins']").attr("value",startDate);
        });
    </script>

     
    Best Regards


    Dennis Guo
    TechNet Community Support

    • Marked as answer by ams1177 Wednesday, April 23, 2014 2:14 PM
    Wednesday, April 23, 2014 11:32 AM

All replies

  • Hi,

    We can add the following code into the editForm.aspx page to solve this issue.

    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var startDate = $("input[title='Start Time']").val();
            $("input[title=' When this event begins']").attr("value",startDate);
        });
    </script>

     
    Best Regards


    Dennis Guo
    TechNet Community Support

    • Marked as answer by ams1177 Wednesday, April 23, 2014 2:14 PM
    Wednesday, April 23, 2014 11:32 AM
  • Thanks Dennis this worked perfectly! I should have thought of that solution since the start date was available further up the form. I'd like to mark this as an answer on StackExhange too (http://sharepoint.stackexchange.com/questions/96787/recurring-event-startdate-in-sp-calendar-edit-form). If you have an account I would be happy to mark as an answer if you post to that thread. Otherwise I will submit the answer there myself and link to your answer here. Thanks again!

    EDIT: I updated the stackexchange thread to reflect this answer.

    Also if you know why this happens I would love to understand it. I can't see any reason this should break just because we create our own edit form.




    • Edited by ams1177 Wednesday, April 23, 2014 8:46 PM
    Wednesday, April 23, 2014 2:18 PM