Serhioromano / bootstrap-calendar

Full view calendar with year, month, week and day views based on templates with Twitter Bootstrap.
http://bootstrap-calendar.eivissapp.com/
MIT License
3.02k stars 1.29k forks source link

Can't get popovers to work #760

Open iancbaldwin82 opened 5 years ago

iancbaldwin82 commented 5 years ago

Trying to use popovers instead of tooltips on the calendar items (the coloured dots in month view). The popover will never show, works fine outside the calendar

here is my event: <a href="http://localhost:26650/Calendar/ModalDetails/75kA-O_RZyg" data-event-id="4" data-event-class="event-manual-event" class="pull-left event event-manual-event" data-toggle="popover" data-trigger="hover" data-content="testing" data-title="test" data-html="true" class="">popover</a>

and here is the updated function in bootstrap-calendar.js: ` Calendar.prototype._update = function() { var self = this;

    $('[data-toggle="popover"]').popover({ container: 'body', placement: 'top' });      

    $('*[data-cal-date]').click(function() {
        var view = $(this).data('cal-view');
        self.options.day = $(this).data('cal-date');
        self.view(view);
    });
    $('.cal-cell').dblclick(function() {
        var view = $('[data-cal-date]', this).data('cal-view');
        self.options.day = $('[data-cal-date]', this).data('cal-date');
        self.view(view);
    });

    this['_update_' + this.options.view]();

    this._update_modal();

};`

I've added the line: $('[data-toggle="popover"]').popover({ container: 'body', placement: 'top' });

cablegunmaster commented 2 years ago

still needed or can be closed?

Neozxz commented 2 years ago

十分感谢,邮件已经收到!