bootstrap-calendar icon indicating copy to clipboard operation
bootstrap-calendar copied to clipboard

Custom variables for templates

Open LiaraAlis opened this issue 9 years ago • 1 comments

Hi together,

it is possible to pass custom variables/ strings to the templates that are not in the events array?

LiaraAlis avatar Feb 27 '15 22:02 LiaraAlis

Yep. Try something like that:

var calendar = $('#calendar').calendar({
    tmpl_path: "/js/tmpls/",
    events_source: function() {return [];},
    custom: {
        test: 1
    }
});

And now you could use (in the template):

<% console.log(cal.options.custom); %>

salemgolemugoo avatar Jun 29 '16 12:06 salemgolemugoo