1

I am trying to change the view of a calendar list view web part using jslink but it seems that it does not affect it at all. Anyone knows how to do that?

Here is some simple code that I was trying to use:

(function () {
    var overrideContext = {};
    overrideContext.Templates = {};
    overrideContext.Templates.Header = "<ul id='calendar'>"
    //overrideContext.Templates.Item = CBody;
    //overrideContext.Templates.Fields = {'LinkTitleNoMenu': { 'View' : '<li><a href="<#=ctx.CurrentItem.FileRef#>"><#=ctx.CurrentItem.Title#></a> </li>' } };
    overrideContext.Templates.Footer = "</ul>"
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideContext);
    s
})();

function CBody(ctx) {
    var ret =  ctx.CurrentItem.Title;
    return ret; 
}

It will be very much appreciated.

1

1 Answer 1

1

I just had the same issue. Like Dribbel already wrote in his comment, if the Statement of Curtis Ruppe is correct:

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

JSLink does not work on column in a calendar list

It would be great if someone else could prove me wrong and has a solution for this issue at Hand.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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