Having trouble displaying resources when implementing FullCalendar-Scheduler along with PrimeNG-Scheduler

Are you familiar with FullCalendar's add-on called Scheduler? I'm attempting to integrate it with the PrimeNG-Schedule component but running into issues. According to the PrimeNG documentation, there is an 'options' property that allows me to pass custom information to FullCalendar.

Even though I am adding resources, they are not showing up on the calendar. Only the events are visible without any associated resources.

Your assistance would be greatly appreciated.

<p-schedule 
    [events]="myevents" 
    [header]="header" 
    [options]="optionConfig"
>
</p-schedule>

Component

ngOnInit() {
    this.resources=[
        { id: 'a', title: 'Room A'},
        { id: 'b', title: 'Room B', eventColor: 'green',"start": "2018-05-01" },
        { id: 'c', title: 'Room C', eventColor: 'orange',"start": "2018-05-01" },
        { id: 'd', title: 'Room D', eventColor: 'red',"start": "2018-05-01" }
    ];

    this.myevents = [
        { id: '1', resourceId: 'a', start: '2018-04-06', end: '2018-04-08', title: 'event 1' },
        { id: '2', resourceId: 'a', start: '2018-04-07T09:00:00', end: '2018-04-07T14:00:00', title: 'event 2' },
        { id: '3', resourceId: 'b', start: '2018-04-07T12:00:00', end: '2018-04-08T06:00:00', title: 'event 3' },
        { id: '4', resourceId: 'c', start: '2018-04-07T07:30:00', end: '2018-04-07T09:30:00', title: 'event 4' },
        { id: '5', resourceId: 'd', start: '2018-04-07T10:00:00', end: '2018-04-07T15:00:00', title: 'event 5' }
    ];

    this.optionConfig = {
        "resources": this.resources
    }

}

Please lend a helping hand in resolving this issue. Thank you.

Answer №1

I have successfully made this feature work. The resources are only visible when you are in timeline based modes. You can check out the documentation for more information: https://fullcalendar.io/docs/timeline-view

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

Having trouble with gsap.reverse() not functioning properly when using onMouseLeave event in React

I've been incorporating simple gsap animations into my React application. I have successfully triggered an animation.play() function on onMouseEnter, but for some reason, the animation.reverse() function is not functioning as expected. Here's ho ...

Prevent the page from closing by implementing a solution within the ionViewWillLeave method

I'm looking to use the ionViewWillLeave method to prevent the page from closing and instead display a pop-up confirmation (using toast.service) without altering the form. ionViewWillLeave(){ this.toast.toastError('Do you want to save your cha ...

Assistance required with an Ajax request to display multiple dropdown menus

I must confess that my knowledge of Ajax and XML is more limited than my understanding of jQuery. My current project involves creating a user-friendly search form where the OPTION tags for each state and city SELECT are pulled from the same XML file using ...

Retrieve various data types through a function's optional parameter using TypeScript

Creating a custom usePromise function I have a requirement to create my own usePromise implementation. // if with filterKey(e.g `K=list`), fileNodes's type should be `FileNode` (i.e. T[K]) const [fileNodes, isOk] = usePromise( () => { ...

Unexpected horizontal scrolling problem on my bootstrap webpage

I'm currently experiencing a horizontal scrolling issue on my Bootstrap page. Can anyone provide insight into why this might be happening? You can view my page here. Here is a snippet of my CSS code: @media (min-width: 1400px) and (max-width: 1440px) ...

Seamless transition animation using jquery

I'm attempting to create a smoother transition when the button is clicked, but so far it's not working as expected. I tried using $slideToggle, but I may have implemented it incorrectly. <button class="btn btn-warning" id="btn-m ...

Utilize jQuery to retrieve data from tables

I have used datatables to filter my table data. I want to extract all the information from the filtered table and store it in either a tuple or an array format. For example, [("1","[email protected]"),("2","[email protected]"), ("3","[email ...

Get rid of the filter arrows in the top row of a styled SpreadJS spreadsheet

Exploring SpreadJS for the first time has been an interesting journey as I dive into understanding table styling. While trying to apply styles across the entire table, I noticed a peculiar issue that arises. Upon applying a theme, whether it be custom or ...

Tips for converting a JSON object to TypeScript compliant format:

I'm looking to convert a JSON response from: [ { "value": { "name": "Actions", "visible": true, "property": "actions" } }, { ...

Adding a new .row in Angular based on an ngFor condition

As a newcomer to Angular, I decided to take on their tutorial with a few modifications. I have created an array as follows: export const HEROES: Hero[] = [ { id: 11, name: 'Mr. Nice' }, { id: 12, name: 'Narco' }, { id: 13, name: ...

When the state is updated, the Observable fails to retrieve the value from the store

My goal is to update the Observable by connecting it to the store, but I encountered an issue where it didn't get updated when the store received a new value: Within my component, I have declared 'tasks' as an Observable: tasks$: Observable ...

Using Jquery to alter elements during every iteration loop

With the help of jquery, my goal is to iterate through all elements that belong to the "item" class and give them different background colors based on their index position. The array mapcolor contains a variety of colors (with a length matching the number ...

When trying to access the key value of a dynamically generated object, it returns as undefined

I am facing a challenge with my student object structure... { Freshmen: [{id: 3}, {id: 5}], Sophomores: [{id: 2}, {id: 6}], Juniors: [{id: 1}, {id: 8}], Seniors: [{id: 9}, {id: 4}, {id: 7}] } My goal is to retrieve full student objects from the d ...

What is the best way to choose a particular radio button from a group of radio buttons using typescript?

Is there a way to automatically select a specific radio button when an item is chosen from a dropdown menu on the webpage using a TypeScript function that is triggered by the dropdown selection? ...

Bi-directional Parallax Scrolling

As I work on creating a parallax scrolling site using Scrollorama, I am looking to implement a unique animation. My vision is for the animation to move from top to bottom, pause at the middle of the page, and then reverse back up to the top. The creator ...

Interface definition triggers an error when assigning a string literal to a field

When defining a string literal type in an interface, I encountered unexpected behaviors. interface IFoo { value: 'foo' | 'boo'; } Upon implementation of the interface in a class, I encountered an error: class Foo implements IFoo ...

`Angular 9 template directives`

I am facing an issue with my Angular template that includes a ng-template. I have attempted to insert an embedded view using ngTemplateOutlet, but I keep encountering the following error: core.js:4061 ERROR Error: ExpressionChangedAfterItHasBeenCheckedEr ...

Exploring the JSON object within Angular framework

I am struggling with looping through a JSON object named SampleJSON. Here is an example of the structure: "type1":{ "0":{"title":"Title1","url":"URL1"}, "1":{"title":"Title2","url":"URL2"}, "2":{"title":"Title3","url":"U", "0":{"title":"Title1","url":"U ...

Ways to design a vertical tab using CSS and JavaScript

I am currently working on creating a Vertical tab element using CSS and jQuery. However, I am facing an issue where I need to display the content of the first tab upon page load. I have tried using the following line of code but it does not seem to be work ...

ASP.NET MVC controller encountering internal server error 500 during Ajax request

I have a scenario where I need to populate two dropdowns in a view: <select class="input-sm form-control input-s-sm inline" onchange="loadCities()" id="comboState"> ... </select> <select class="input-sm form-control input-s-sm inline" ...