My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2522: Fullcalendar Scheduler - Associating Events with Resources
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Aug 2015


Sign in to add a comment
 
Reported by shahzadt...@gmail.com, Jun 17, 2015
I'm using Fullcalendar Scheduler Plugin, I have a problem to Associate Events with Resources id, Resources coming from database and event generate automatically on client side. Now I want to assign Resources id to event, please see my code, is there any call back function?

$('#servicecalendar').fullCalendar({
        defaultView: 'timelineDay',
        views: {
            timelineThreeDays: {
                type: 'timeline',
                duration: { days: 3 }
            }
        },
        resourceLabelText: 'Employees',  

          resources: "getresources",// coming from database e.g [{"id":33,"title":"John","status":"active"}]

        //eventResourceField: 'userid',

        events: [
            { 
              id: '1', 
              // actually here i want to assign resource id
              // original code
              //resourceId: '33', 

              // this is mine logic
              resourceId:  function(resource) {
                    var id = resource.id;                        
                    return id;
              },
                start: '2015-06-17T02:00:00', 
                end: '2015-06-17T07:00:00', 
                title: 'event 1' 
            },                      
        ],

Aug 2, 2015
Project Member #1 adamrs...@gmail.com
resourceId doesn't accept a function, but you could probably use eventDataTransform to achieve the same thing:

http://fullcalendar.io/docs/event_data/eventDataTransform/
Status: Done
Sign in to add a comment

Powered by Google Project Hosting