Paul-DS / bootstrap-year-calendar

[DEPRECATED] A fully customizable year calendar widget, for boostrap !
Apache License 2.0
293 stars 243 forks source link

mouseOnDay doesn´t work with customDatasourceRenderer #186

Open Eloytxo opened 6 years ago

Eloytxo commented 6 years ago

Hi, Im new with bootstrap-year-calendar but I really like it. I´m trying to do something particular: write a letter after day number, every day that has an event.

I have done it like this:

        customDataSourceRenderer: function(element, date, events) {
            $(element).append(events[0].primLetra);
                        $(element).parent().css('background-color', events[0].color);
           }

But, when I use this customDatasourceRenderer, mouseOnDay doesn´t work because e.events comes empty.

mouseOnDay: function(e) {
            if(e.events.length > 0) {
                 //Here e.events comes empty :(
        },

Is there any way to pass the events to each day in the customDatasourceRenderer?

Thanks!!!