Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FullCalendar hide time in week timeline view

Is there a way to hide the time in a timeline view. In the month timeline you only see the days and no time, but in week timeline the time is also displayed.

I want it to be the same in week timeline. I need this because all my events are all-day events, so no need to display the time axis.

Desired result:

Resource | Mon 1/12 | Tue2/12 | Wed 3/12 | Thu 4/12 | Fri 5/12 | Sat 6/12 | Sun 7/12

like image 743
Mounhim Avatar asked Dec 02 '15 18:12

Mounhim


People also ask

How do I turn off weekends in Fullcalendar?

Just go from the startDate to the endDate and check if any of those days are weekends. If so, display the alert / popup and return false. select: (start, end, allDay) => { var startDate = moment(start), endDate = moment(end), date = startDate. clone(), isWeekend = false; while (date.

How do I get Fullcalendar day?

Calendar::getDate Returns a Date for the current date of the calendar. For month view, it will always be some time between the first and last day of the month. For week views, it will always be sometime between the first and last day of the week.

What is the use of Fullcalendar?

What is Fullcalendar? FullCalendar is a JavaScript library that seamlessly integrates with such popular JavaScript frameworks as Vue, React, Angular. Thanks to its excellent documentation, one won't have trouble incorporating the library into projects.

How do I start and end date in Fullcalendar?

We can get start date by getView event with intervalStart. We can get end date by getView event with intervalEnd. var month = $('#calendar'). fullCalendar('getView').


1 Answers

I have solved it by using duration and slotduration in a custom view:

defaultView: 'customWeek',
views: {
    customWeek: {
        type: 'timeline',
        duration: { weeks: 1 },
        slotDuration: {days: 1},
        buttonText: 'Custom Week'
    }
},

See also http://jsbin.com/mogefixege/edit?js,output for code

like image 156
Mounhim Avatar answered Sep 18 '22 10:09

Mounhim