开发者

making title, start, end invisible

Hi I was just wondering if there's a way to make the "title, start, end" invisible on the cal开发者_如何学运维endar for an event. Reason so is I would like to implement the qtip to show these information when they hover over the event. I'm using the most updated version of fullcalendar which is from this file: "fullcalendar-1.4.6.zip" with C# as serverside and jQuery as clientside. Thank you all for looking.


I have a very similar requirement (show tooltip on hover) and i had to remove the start and end time from the event's header. I have done it as below. The magic gets done by the timeFormat: {....} option block ():

timeFormat: {
            // for agendaWeek and agendaDay do not display time in title
            // time already displayed in the views
            agenda: '',

            // for all other views (19:00 - 20:30)
            '': 'H:mm{ - H:mm}'
},

Note that I am using agenda views, and I remove the time components only for the week and the day views.

NOTE: As per my requirements, I did not have to remove the event-title. Question to you.... what would you display as the event header, if not the time AND the title? Would an empty header look a bit odd? Anyways.... let me know if you have any further issues.

Sample screen shot link: alt text http://img441.imageshack.us/img441/9587/calendarview.jpg.

A sample snippet of what options I had used:

$(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,agendaWeek,agendaDay'
        },

        timeFormat: {
            // for agendaWeek and agendaDay do not display time in title
            // time already displayed in the view
            agenda: '',

            // for all other views (19:00 - 20:30)
            '': 'H:mm{ - H:mm}'
        },

        columnFormat: {
            month: 'dddd',    // Monday
            week: 'dddd, MMM dS', // Monday, July 13th
            day: 'dddd, MMM dS'  // Monday, July 13th
        },

        axisFormat: 'H:mm',
        allDaySlot: false,
        slotMinutes: 30,
        defaultEventMinutes: 22,
        editable: false,
        aspectRatio: 2,
    });
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜