Display more Text in fullcalendar

后端 未结 9 873
一整个雨季
一整个雨季 2020-12-12 09:45

I am looking for a solution to display more information in event.

For example in the DayView you see a event from 06:00 to 10:00.
I want to display a additio

9条回答
  •  再見小時候
    2020-12-12 10:06

    I personally use a tooltip to display additional information, so when someone hovers over the event they can view a longer descriptions. This example uses qTip, but any tooltip implementation would work.

    $(document).ready(function() {
        var date = new Date();
        var d = date.getDate();
        var m = date.getMonth();
        var y = date.getFullYear();
        $('#calendar').fullCalendar({
            header: {
                left: 'prev, next today',
                center: 'title',
                right: 'month, basicWeek, basicDay'
            },
            //events: "Calendar.asmx/EventList",
            //defaultView: 'dayView',
            events: [
            {
                title: 'All Day Event',
                start: new Date(y, m, 1),
                description: 'long description',
                id: 1
            },
            {
                title: 'Long Event',
                start: new Date(y, m, d - 5),
                end: new Date(y, m, 1),
                description: 'long description3',
                id: 2
            }],
            eventRender: function(event, element) {
                element.qtip({
                    content: event.description + '
    ' + event.start, style: { background: 'black', color: '#FFFFFF' }, position: { corner: { target: 'center', tooltip: 'bottomMiddle' } } }); } }); });

提交回复
热议问题