2

I have several calendar views and I would like to point them to different page views I have created.

Is there a way of doing this? If so how would I go about doing this? It currently points to DispForm.aspx

Please note SharePoint is fairly new to me.

I will appreciate any help on this.

  • So you got several calendar views and want them all to display in the same calendar? Or have you created multiple pages displaying the calendar items in different ways? – Christoffer Jun 5 '14 at 17:20
  • Hi Phil thank you for getting back to me, i have created 3 calendar views. And I have created 3 different display Forms. When you click on a calendar appointment in any of the calendar views it takes me to DispForm.aspx, but ideally i want it to go to the different Forms displays. – b5ml Jun 6 '14 at 7:49
  • Hi Robert Lindgren, i tried the overlay feature by combining all the calendars, that only works for the calendar view, but when you click on the links it takes you to the same view details form, how would i make it go to the different forms? – b5ml Jun 9 '14 at 10:46
  • b5ml, did you finally find a solution? I have the exact same problem. Thanks! – user34404 Oct 17 '14 at 21:51
  • Hi Nathan sorry for the late reply, sorry i didnt find a solution. Have you found once since you added your post here? – b5ml Nov 25 '14 at 19:52
0

You could override default Calendar handler for displaying Event form as demonstrated below.

How to override Calendar click handler for displaying Event form

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">

$("body").on("dblclick click", ".ms-acal-item", function(e){
   e.stopPropagation(); 

  //extract default Event page url and generate new one
  var defaultEventPageUrl = $(this).find('a').attr('href');
  var newEventPageUrl = defaultEventPageUrl.replace('Calendar','Team Calendar');

  SP.UI.ModalDialog.showModalDialog({title:"Meeting",url:newEventPageUrl});


});


</script>

Note: jQuery library is loaded from CDN

Usage

  • Add Content Editor web part on Calendar view page
  • Insert the provided JavaScript code
  • Hi Vadim most appreciated I think your approach is heading the in the right direction. I tried to add the JS into the Content Editor (on the same page as the Calendar view page) but it seems to have not overridden the DispForm.aspx) Is there somewhere i need to specify the new page i want it to link to? I added: $("body").on("dblclick click", ".ms-acal-item", function(e){ e.stopPropagation(); //set custom display calendar form URL var displayUrl = '/mysandpit/Lists/CalendarTest/DispForm.aspx?ID=1'; SP.UI.ModalDialog.showModalDialog({title:"Meeting",url:displayUrl }); }); – b5ml Jun 12 '14 at 9:07
  • Hi, please make sure to wrap the JS code inside the script tag: <script>...</script> – Vadim Gremyachev Jun 12 '14 at 9:09
  • Hi Vadim, if its working for you, i must be obviously doing something wrong somewhere... this is it wrapped... <script language="JavaScript" type="text/javascript"> $("body").on("dblclick click", ".ms-acal-item", function(e){ e.stopPropagation(); //set custom display calendar form URL var displayUrl = '/mysandpit/Lists/CalendarTest/DispForm.aspx?ID=1'; SP.UI.ModalDialog.showModalDialog({title:"Meeting",url:displayUrl }); }); </script> Is the first url path.. showing the final destination? Or do I need to add this? – b5ml Jun 12 '14 at 9:35
  • One more question, which version of SharePoint are you using? Probably it should be the first question:) – Vadim Gremyachev Jun 12 '14 at 10:12
  • Its Sharepoint 2010 Vadim... The Content Editor on this version doesn't always need the JS opening and closing tags. Nonthe less i have tried both options. – b5ml Jun 12 '14 at 10:28
0

How about creating three custom Event content types and associating them with a calendar? Each content type can be customized as needed (e.g. columns and display forms). As long as the appropriate content type is used to create new items, when an item link is clicked from the calendar the desired display form will open. Additionally, the overlay feature can be used in a calendar list utilizing multiple content types if a common column is used across all three content types.

0

I might be late in answering but I found this solution. Opening the calendar view in Sharepoint designer 2013, I used Ctrl+F to find DispForm.aspx and in that line I changed it to refer to /Item/editifs.aspx?&DefaultView=Disp&" Here the Disp is referencing to my Infopath Form View, which you may even change. Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.