fullCalendar vertical resource view issue

Post Reply
edisonda
Posts: 1
Joined: 17 Nov 2017, 10:29

18 Jan 2018, 10:44

I have problem with implement fullCalendar vertical resource view to custom <p-schedule>

I add extra options and everything work correctly, except add groups.

My html implementation is:
<p-schedule [events]="events" [options]="scheduleOptions"></p-schedule>

JS extra options:
this.scheduleOptions = {
schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
defaultView: 'agendaDay',
defaultDate: '2016-01-12',
editable: true,
selectable: true,
eventLimit: true,
groupByResource: true,
header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' },
slotLabelFormat: 'H:mm',
maxTime: '18:00:00',
minTime: '06:00:00',
weekends: false,
resources: [
{ "id": "a", "title": "Room A" },
{ "id": "b", "title": "Room B" },
{ "id": "c", "title": "Room C" },
{ "id": "d", "title": "Room D" }
],
businessHours: { dow: [1, 2, 3, 4, 5], start: '06:00', end: '18:00' },
};

My event json has resourcesId:
{
"data": [{
"id": 1,
"resourceId": "a",
"title": "All Day Event",
"start": "2016-01-01",
"className": "sell-event",
"icon": "ui-icon-insert-drive-file"
},
{
"id": 2,
"resourceId": "b",
"title": "Long Event",
"start": "2016-01-07",
"end": "2016-01-10",
"className": "nosell-event"
},
{
"id": 3,
"resourceId": "b",
"title": "Repeating Event",
"start": "2016-01-09T16:00:00",
"className": "meeting-event"
},
{
"id": 4,
"resourceId": "c",
"title": "Repeating Event",
"start": "2016-01-16T16:00:00",
"className": "consultant-event"
},
{
"id": 5,
"resourceId": "d",
"title": "Conference",
"start": "2016-01-11",
"end": "2016-01-13",
"className": "task-event"
},
{
"id": 6,
"resourceId": "d",
"title": "Meeting",
"start": "2016-01-12T10:30:00",
"end": "2016-01-12T12:30:00",
"className": "inaccessible-event"
},
{
"id": 7,
"resourceId": "c",
"title": "Lunch",
"start": "2016-01-12T12:00:00",
"className": "sell-event"
},
{
"id": 8,
"resourceId": "a",
"title": "Meeting",
"start": "2016-01-12T14:30:00",
"className": "consultant-event",
"className": "meeting-event"
},
{
"id": 9,
"resourceId": "b",
"title": "Happy Hour",
"start": "2016-01-12T17:30:00",
"className": "task-event"
},
{
"id": 10,
"resourceId": "c",
"title": "Dinner",
"start": "2016-01-12T20:00:00",
"className": "nosell-event"
},
{
"id": 11,
"resourceId": "a",
"title": "Birthday Party",
"start": "2016-01-13T07:00:00",
"className": "consultant-event"
},
{
"id": 12,
"resourceId": "d",
"title": "Click for Google",
"url": "http://google.com/",
"start": "2016-01-28",
"className": "task-event"
}
]
}

I use non commercial licence in fullCalendar as you see in options, but I think that isn't problem with that.

Anyone have any idea?

merve7
Posts: 359
Joined: 12 Sep 2017, 10:44

26 Jan 2018, 10:09

Can you provide a test case for us like a plunkr? (http://plnkr.co/edit/6q5v84DWolH6DeAdi70w?p=preview)

AkshaySamcom
Posts: 1
Joined: 01 Aug 2018, 13:45

01 Aug 2018, 13:54

hello,
i need to add resources like

https://fullcalendar.io/docs/vertical-resource-view

i tried lots of examples but i can't get resources in p-schedule

Code: Select all

<p-schedule [events]="events" [options]="optionConfig" (onDayClick)="dayClickevent($event, content)" (onEventClick)="eventclick($event, content)"
          [header]="header" [defaultDate]="minDate" [eventStartEditable]="false" [eventLimit]="4" [editable]="true"></p-schedule>

Code: Select all

this.optionConfig = {
      defaultView: 'agendaDay',
      groupByResource: true,
      resourceGroupField: 'id',
      resources: [
        { id: 'a', title: 'Room A' },
        { id: 'b', title: 'Room B' }
      ]
    };
this is my code but i can't resources like above example of fullcalendar vertical-resource-view

Post Reply

Return to “Serenity - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest