0
votes

My aim is to have a single, generic week view that can be used to structure a week schedule of events. The schedule very rarely changes throughout each month, and the database that exists currently holds each event as an instance (so 7 events per day = 49 records. I'd like to stick with this)

I've found fullcalendar to be closest to what I want, however the functionality of a full calendar is overkill for my purpose. Is there any ability to just use fullcalendar for a generic week, and not related to any actual week, month or year?

2

2 Answers

0
votes

Yes, you can easily lock fullcalendar into a particular view.

$(document).ready(function() {

        var today = moment();  //get todays date

        $('#calendar').fullCalendar({
            header: {
                center: 'title',  //only display a title, no nav buttons
            },
            defaultDate: today,  
            editable: false,
            defaultView: agendaWeek,  //or whatever you want
            events: [], //array of events, see docs can use ajax to get them
        });
});

try that to start.

0
votes

I know this question is super old, but I had the same issue. The client needed to be able to manage weekly recurring availability on a calendar. They were already using (and enjoying) FullCalendar and I didn't want to introduce a new calendar UI. I was able to "solve" the problem like this:

Using the FullCalendar timeGridWeek view... I found all the .fc-day-* items and converted their labels from (for example) "Thu 4/15" to just "Thu".

I allow users to make any edits they want on the calendar, just storing everything locally. When they "save" their changes, I convert each event's data to have the following structure:

  • day (int) day of the week, 0-6
  • start (MySQL TIME) start time of the event
  • end (MySQL TIME) end time of the event

The only weird thing about this is that the timeGridWeek view highlights the current day in yellow, and I haven't been able to figure out what CSS to use to change that, haha.

Hopefully this helps anyone searching for a solution in the future!