Display only event's start date and end date in fullcalendar

↘锁芯ラ 提交于 2019-12-25 02:16:34

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/20564890/display-only-events-start-date-and-end-date-in-fullcalendar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!