Tobi
Tobi

Reputation: 192

CLNDR.js - using 'eventsThisMonth' with 'lengthOfTime'

I'm using CLDR.js with a lengthOfTime set to 6 month.

$('#someID').clndr({
    template: $('#calendar-template').html(),
    events: someJSON,
    lengthOfTime: {
        months: 6
    }
});

PROBLEM: After setting lengthOfTime I cant use eventsThisMonth in my underscore-template anymore.

<% _.each(eventsThisMonth, function(event) { %>
    <h3><%= event.title %></h3> //nothing!!!
<% }); %>

Can anybody help me with this?

Upvotes: 0

Views: 215

Answers (1)

Tobi
Tobi

Reputation: 192

@tobiasriemen Sure! Try accessing the variable `eventsThisInterval` in your template instead. That should do the trick.

— Kyle Stetz (@kylestetz) October 5, 2016

Upvotes: 0

Related Questions