have a javascript code that will stop the links, but will also stop the links to 'expand' if more that 3 items exist. is there a way using javascript to only stop the event hyperlink?

thanks in advance.

link to disable hyperlink: https://social.msdn.microsoft.com/Forums/office/en-US/3492bb87-ed0d-4fa6-9f40-1473a964bcc1/how-to-remove-displayform-link-from-items-in-a-calendar-view-spo?forum=sharepointcustomization

  • thank you sooooo much, this works great, saves me so much time, the links disable but for some reason it doesn't expand by default. – Marco Vandermey Jan 2 '18 at 15:40
  • Please don't add "thank you" as an answer. Once you have sufficient reputation, you will be able to vote up questions and answers that you found helpful. - From Review – MHeld Jan 2 '18 at 16:07

We can use the code below to achieve it.

<script src="//code.jquery.com/jquery-3.2.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {      
     setInterval(function (){
        $(".ms-acal-item").bind("click dblclick", function () {
            return false;
        $(".ms-acal-item a").bind("click dblclick", function () {
            return false;

        $(".ms-acal-item a").each(function(){

enter image description here

| improve this answer | |
  • thank you so much, works fantastic, except for the expand function, still stays a collapsed by default. – marco Jan 2 '18 at 15:47

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.