Is it possible to replicate this view using FullCalendar?

After downloading FullCalendar and testing it out, I realized that it almost meets all the requirements for a resource scheduling application I'm developing for my company. However, there is one specific customization I need help with in order to display the events differently.

The current configuration looks like this:

https://i.sstatic.net/Zeblu.png

But what I ultimately need is for it to display the events side by side like this:

https://i.sstatic.net/4c2Pp.png

This setup is crucial for portraying the sequential process accurately - ensuring that if one event (in blue) extends into another day, the following day's events (in purple) must wait until the initial event is completed. This clarity is not as evident in the top image compared to the bottom one.

Can this be achieved through configuration alone, or will modifications need to be made directly to the source code or by intercepting the event rendering process?

Thank you!

[EDIT] Here are the code snippets:

TEMPLATE:

<FullCalendar ref="fullCalendar"
          default-view="resourceTimelineMonth"
          :plugins="calendarPlugins"
          :events="calEvents"
          :resources="calResources"
          :weekends="true"
          :editable="true"
          :event-overlap="false"
          :slot-width="100"/>

SCRIPT:

data () {
  return {
    ...
    calendarPlugins: [ interactionPlugin, resourceTimelinePlugin ],
    calEvents: [
        { resourceId: "101", title: 'WO123', start: '2019-11-01T07:00:00', end: '2019-11-01T12:00:00', backgroundColor: 'red' },
        { resourceId: "101", title: 'WO127', start: '2019-11-01T12:00:00', end: '2019-11-01T18:00:00', backgroundColor: 'green'  },
        { resourceId: "101", title: 'WO144', start: '2019-11-01T18:00:00', end: '2019-11-02T03:00:00', backgroundColor: 'blue'  },
        { resourceId: "101", title: 'WO145', start: '2019-11-02T03:00:00', end: '2019-11-02T10:00:00', backgroundColor: 'purple'  }
    ],
    calResources: [
        {id: "101", title: "KM101"},
        {id: "102", title: "KM102"},
        {id: "103", title: "KM103"},
        {id: "104", title: "KM104"},
        {id: "105", title: "KM105"},
      ],
    ...
}

Answer №1

After mentioning in the previous comments, the reason you're not seeing the desired outcome is because when each slot is compressed to a single day, fullCalendar switches to an "all-day" display mode. It stops considering specific times of day and simply shows the day(s) on which the event occurs.

To achieve a display closer to what you want, try reducing the slot duration to half a day (creating the least division of the day possible) and modifying the slot labels accordingly. When the slot duration includes hours, fullCalendar will take the time component of the event into account again during rendering.

I'm unfamiliar with vue.js syntax so I've provided code and a demo using vanilla JS below. Hopefully, you can easily adapt it to the syntax used by the vue plugin.

Additional options for your calendar configuration:

slotDuration: { hours: 12 },
slotLabelFormat: [
  { weekday: "short" },
  { hour: "2-digit", },
],

Live demonstration: https://codepen.io/ADyson82/pen/VwwXowr

Refer to https://fullcalendar.io/docs/date-display for relevant documentation.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Utilizing middleware with express in the proper manner

Hello there! I'm just double-checking to see if I am using the correct method for implementing middleware in my simple express app. Specifically, I am trying to ensure that the email entered during registration is unique. Here's an example of wha ...

Understanding the functionality of the Array.prototype.map() method when used with JavaScript Objects

Experimenting with code: let obj ={}; let newItems = ["Apple", "Banana", "Carrot", "Donut"].map(item => { obj.count= Math.random()*item.length; obj.itemName= item; return obj; }); console.log(newItems); The output ...

Avoid using `@typescript-eslint/no-floating-promises` when using a `const` function

Can anyone help me understand why the @typescript-eslint/no-floating-promises rule works with some async functions but not all? To my understanding, these two functions should be equivalent: const getUser = async (userId: string): Promise<User> => ...

The quote generator is on strike, API refuses to provide fresh quotes

After building my entire project in Visual Studio Code and testing it on Chrome and Explorer, I was excited to see that it worked perfectly - retrieving a new quote and author with the press of a button. However, when I tried to put it into Codepen, I enco ...

CORS has restricted access to the XMLHttpRequest, despite the backend being configured correctly

I have a Flask backend integrated with React frontend. I encountered an issue while attempting to make a POST request to my backend. The error message states: Access to XMLHttpRequest at 'http://127.0.0.1:5000/predict' from origin 'http://lo ...

Using JavaScript to trigger a PHP script execution

I'm facing an issue with a server-side PHP script that connects to a database and retrieves data. It seems to work fine in a separate browser, but I can't seem to make it run properly from a script within HTML. Here's the code snippet causi ...

The form within the dynamically loaded AJAX content is malfunctioning

My webpage is set up to load content from a separate file (content.php) into a div and refresh it every 5 seconds. In the content.php file, I have a form (basic HTML without javascript) that works fine when accessed directly at (example.com/content.php). ...

JavaScript was unable to compute the area based on the given inputs

Expected CalculatorActual Calculator I am in the process of developing a unit conversion calculator for area measurements in Nepal using JavaScript. The calculator will convert traditional units like Ropani, Anna, Paisa, and Dam to square feet and square m ...

The Bootstrap nav-tab functions perfectly on a local server, but unfortunately does not work when hosted remotely

UPDATE: Issue resolved so I have removed the Github link. It turns out that Github pages require a secure https connection for all linked scripts. Always remember to check the console! I encountered an unusual bug where the Bootstrap nav-tab functionality ...

What are the appropriate scenarios to utilize the declare keyword in TypeScript?

What is the necessity of using declare in TypeScript for declaring variables and functions, and when is it not required? For instance, why use declare var foo: number; when let foo: number; seems to achieve the same result (declaring a variable named ...

What is the optimal strategy for managing multilingual text in a React website?

As I develop a react website with multiple localizations, I am faced with the question of how to best store UI texts for different languages. Currently, I am contemplating two approaches: One option is to store text directly in the UI code, using an objec ...

You have encountered an issue with the runtime-only build of Vue, which does not include the template compiler

Lately, I have been utilizing Vue in a project and encountered an issue where upon compiling, my browser page displays as white with an error message stating "You are using the runtime-only build of Vue where the template compiler is not available. Either ...

Best practices for outputting objects within an array using jQuery and JavaScript

Seeking guidance. I am utilizing a unique jQuery calendar plugin (which appears to be uncommon!) that is fully initialized with JS, without any HTML. In order to include events, you must define each event as an object inside an array: events: [ { ...

How do I set up Firebase functions to trigger onWrite when listening for a specific child just once?

Is there a way to access the child under a different node each time the Firebase onWrite function is triggered? To retrieve this child, you can use the following code: {const saatt = (context.database.ref('kullanicilar/1111/marina1/2021/1saat'). ...

Wave: clock strikes midnight

I have a data chart with the X-axis representing time. I want the ticks on the X-axis to be placed at 0:00 each day. This was working fine before I updated to the latest version of Flot. ... xaxis: { ticks: 6, mode:"time", timezone:<cfout ...

React js code to create a position ranking table

Currently, I am in the process of developing a web application using Reactjs with a ranking table managed by Firebase. However, I have encountered a question: Is it possible to dynamically change the position numbers after sorting the table based on the am ...

Issue with Datatables FixedColumns plugin in IE8/7 and Firefox

I am encountering issues with the FixedColumn plugin on IE8, IE7, and Firefox. All of them are causing my table to malfunction, displaying the following error: Error: Invalid argument. Line: 566 Char: 3 Code: 0 URI: ./resources/javascript/dataTable/Fixed ...

Tips for utilizing process.stdin in Node.js with Javascript?

Currently, I'm developing a Javascript-based poker game that is designed to process standard input in the following manner: https://i.stack.imgur.com/D1u15.png The initial line of input will consist of an integer indicating the total number of playe ...

Switching from using v-data-table to v-virtual-scroll

I am currently in the process of switching from using v-data-table to v-virtual-scroll, but I am struggling to determine the correct syntax for the virtual scroller. Can you assist me with this, please? I want to maintain the same display as before, but no ...

Issues with image uploads in Node.js database storage

Trying to update an image using the put method is resulting in a 'filename' undefined error. Interestingly, the image updates successfully when editing without changing the image. The code snippet below shows the implementation: app.put('/a ...