如何显示日历事件的主题而不削减它 - 使用FullCalendar UI [英] How to display the Calendar Event's Subject without cutting it - using FullCalendar UI

查看:609
本文介绍了如何显示日历事件的主题而不削减它 - 使用FullCalendar UI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用。 (适用于fullcalendar的早期版本)



http:// jsfiddle.net/marcrazyness/cjn4vxbm/

  $(document).ready(function(){
$('#myCalendar')。fullCalendar({
events:[
{
title:'event',
start:'2014-10-01',
description:'my Event Description',
allDay:true
}
],
eventRender:function(event,element){
//这里使用qtip设置悬停消息
element.qtip({
content:event.description,
//位置(可选)
position:{
my:'center center ',
at:'center center',
target:$(element)
}
});
}
} b});

编辑!从Mike的@MikeSmithDev回复,fullcalendar 2.1.1的最新版本处理这个:


I am using the FullCalendar UI to display calendar events from a table in the database.

The issue that I am having is, when I have an event that is less than 1 hour in duration length, the subject of that event will not be viable. I have attached a screenshot to show you how it is currently being displayed.

When looking at the the first event "IT Meeting" it appears with no problem. On the other hand, the next event (ie. starts at 5:24PM - 6:00 PM) the subject is not readable. How or what can I do to make the subject viable so the user knows what he/she have scheduled?

Thank you

解决方案

To get around this issue I used http://qtip2.com/. (For earlier versions of fullcalendar)

http://jsfiddle.net/marcrazyness/cjn4vxbm/

$(document).ready(function () {    
    $('#myCalendar').fullCalendar({
        events: [
            {
                title: 'event',
                start: '2014-10-01',
                description: 'My Event Description',
                allDay: true
            }
        ],
        eventRender: function(event, element) {
        // Here using qtip to set hover message.
        element.qtip({
            content: event.description,
            // Position (optional)
            position: {
                my: 'center center',
                at: 'center center',
                target: $(element)
            }
        });
        }
    });
});

EDIT! From Mike's @MikeSmithDev reply the latest stock version of fullcalendar 2.1.1 handles this for you:

这篇关于如何显示日历事件的主题而不削减它 - 使用FullCalendar UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆