在fullcalendar中仅显示事件的开始日期和结束日期 [英] Display only event's start date and end date in fullcalendar

查看:555
本文介绍了在fullcalendar中仅显示事件的开始日期和结束日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我认为用两个不同的开始来复制事件,一个是与事件的开始日期和结束日期。真正的开始日期和第二个结束日期。



我想知道是否有更好的方法来做到这一点。



PS:对不起我的坏英文



编辑:这里日历的代码

  $('#calendar')。fullCalendar({
header:{
left:'prev,next today',
center:'title',
right:'month,basicWeek,basicDay'
},
events:task.json,
loading:function(bool){
if(bool){
$ .mobile.loading('show');
} else {
$ .mobile.loading('hide');
}
}
});

以及这里的json文件:

 
title:Task 1,
id:1,
start:2013 -09-11,
end:2013-09-16
},{
title:任务2,
id: 2,
start:2013-09-25,
end:2013-09-25
},{
title:任务3,
id:3,
开始:2013-12-16,
结束:2013-12-17
}
]

目前我没有做任何事情,我试图找到解决方案首先。

解决方案

感谢您在此处添加代码。我认为这是不可能的。默认行为是从开始到结束显示。您必须使用您使用的方式。


I am looking for a way to display only the start date and end date of an event.

I think duplicate the event with two differents start, one with the real start date and the second with the end date.

I wonder if there is a better way to do this.

PS: sorry for my bad english

EDIT: Here the code for the calendar

$('#calendar').fullCalendar({
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,basicWeek,basicDay'
        },
        events: "task.json",
        loading: function (bool) {
            if (bool) {
                $.mobile.loading('show');
            } else {
                $.mobile.loading('hide');
            }
        }
    });

and here the json file :

[
    {
        "title": "Task 1",
        "id": "1",
        "start": "2013-09-11",
        "end": "2013-09-16"
    }, {
        "title": "Task 2",
        "id": "2",
        "start": "2013-09-25",
        "end": "2013-09-25"
    }, {
        "title": "Task 3",
        "id": "3",
        "start": "2013-12-16",
        "end": "2013-12-17"
    }
]

I did nothing for the moment, I am trying to find a solution first.

解决方案

Thank you for adding code here. I don't think it is possible by any other way. The default behavior is show from start to end. You have to use the way you are using.

这篇关于在fullcalendar中仅显示事件的开始日期和结束日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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