locked
JSLink does not work on column in a calendar list RRS feed

  • Question

  • Can someone confirm the following:

    I created a calendar list, added a lookup column to it and added a JSLink with custom script to that column.

    I then go to a new / edit item form:

    In any other list, the lookup + JSLink work perfectly.

    In calendar list, the page does not even register my JSLink script file. There is no reference to it anywhere on the page, and it is not being loaded.

    I suspect, calendar list forms do not support JSLink property on a column?


    Regards, Shai Petel.

    Tuesday, January 14, 2014 5:09 PM

All replies

  • bumping since I got no reply,

    Anyone else see it?

    There is zero information on this issue on the internet...


    Regards, Shai Petel.

    Tuesday, January 21, 2014 3:10 PM
  • I am also facing this issue..

    any solution found?

    Thursday, January 23, 2014 6:03 AM
  • Non yet, and in an app there is nothing we can do about it.

    In a full trust solution we could at least include our JS file in some other way on the page, but this is impossible in an app AFAIK...


    Regards, Shai Petel.

    Thursday, January 23, 2014 3:49 PM
  • In my case, I have farm solution and i have loaded java script in masterpage.

    and my java script file contains code as below,

    var DepartmentCtx = {};
        DepartmentCtx.Templates = {};
        DepartmentCtx.Templates.Fields = {
            "fieldInternalName": {
                "NewForm": RenderField,
                "EditForm": RenderField
            }
        };
        SPClientTemplates.TemplateManager.RegisterTemplateOverrides(
            DepartmentCtx
            );

    function RenderField(ctx) {
        alert("Test");
    }


    But it is still not working for calendar list and this is working fine in another list type like custom list ,task list, etc.

    Another thing i found that when i am editing new form page of calendar list and edit new form web part, there is no web part property for JSLink also.


    Friday, January 24, 2014 4:22 AM
  • After about an hour's worth of research I found the problem. Microsoft specifically targets the Invalid, Event, and Survey list types to ignore client rendering. Unless you create your own webpart you will not ever be able to use any of the JSLink properties for these list types. Maybe somebody at Microsoft can explain themselves here as to why they would have crippled us like that or what a proper approach for this common problem would be. Yet another reason the Calendar is a piece of garbage in SharePoint 2013!
    • Proposed as answer by Kalpesh_Vaghela Friday, December 12, 2014 12:20 PM
    • Unproposed as answer by Shai Petel Friday, December 12, 2014 12:30 PM
    • Proposed as answer by drdany Monday, December 29, 2014 10:28 AM
    Saturday, June 21, 2014 9:20 PM
  • Thanks Curtis, reaffirming my issue,

    Kalpesh, looks to me more like a rephrase of the issue rather than an answer to workaround, no?


    Regards, Shai Petel.

    Friday, December 12, 2014 2:00 PM
  • I am no time traveler but bumped in to this post pretty late.

    JSLink field will appear in Miscellaneous section for All Events or List kind of views for Event lists, But not for calendar views. 

    Thanks,

    Mukesh

    Wednesday, June 27, 2018 1:42 PM