Setting a id in schedulerEvent and retrieving on SchedulerEventRecorder edit event

30 views
Skip to first unread message

Chris Domville

unread,
Nov 3, 2017, 6:48:55 AM11/3/17
to AlloyUI


Hi, hope someone can help with this. How can i pass an id through so i can use it to update my db ? The id attribute is undefined but the docs say it exists.

 var events = [
       
        {
            id: "Test", <- setting id
            color: "#8d8",
            content: 'Earth Day Lunch',
            disabled: true,
            endDate: new Date(2013, 3, 22, 13),
            meeting: true,
            reminder: true,
            startDate: new Date(2013, 3, 22, 12)
        },
       
      ];
var eventRecorder = new Y.SchedulerEventRecorder({

          on: {
              edit: function (event) {
                  console.log(this.get('id'));  <- undefined
                  console.log(this.get('startDate')); <-"Fri Nov 03 2017 10:12:14 GMT+0000 (GMT Standard Time)"
              }
          }
      });

new Y.Scheduler(
        {
            activeView: weekView,
            boundingBox: '#myScheduler',
            date: new Date(2013, 3, 25),
            eventRecorder: eventRecorder,
            items: events,
            render: true,
            views: [dayView, weekView, monthView, agendaView]
        }
      );

Dutchwebs Kouffeld

unread,
Apr 16, 2018, 11:26:57 PM4/16/18
to AlloyUI
Dirty workaround:

this.getUpdatedSchedulerEvent()._state.data.id.value

Op vrijdag 3 november 2017 11:48:55 UTC+1 schreef Chris Domville:
Reply all
Reply to author
Forward
0 new messages