search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

OnEventMoved

Asked by Fernando
10 years ago.

for some reason the oneventmoved event is not firing for my control any ideas? Funny thing is that the onEventClick is firing, I must be missing something simple. I'm on version 130. Code below summarized

if (typeof (CRG) == "undefined")
{ CRG = { __namespace: true }; }

CRG.Calendar = {
__namespace: true,
_loadCalendar: function () {
if (this._viewType == "month") {
this._calendarControl = new DayPilot.Month("dp");
this._calendarControl.theme = "month_transparent";
}
else if (this._viewType == "week") {
this._calendarControl = new DayPilot.Calendar("dp");
this._calendarControl.viewType = "Week";
this._calendarControl.theme = "calendar_transparent";
}

this._calendarControl.startDate = new DayPilot.Date();
this._calendarControl.heightSpec = "Parent100Pct";
this._calendarControl.locale = "en-us";
this._calendarControl.eventHeight = 50;

this._calendarControl.onEventMoved = function (args) {
alert(args.newStart);
//var appt = {};
//appt.ScheduledStart = args.newStart;
//appt.ScheduledEnd = args.newEnd;
//SDK.JQuery.updateRecord(args.e.data.id, appt, "appointment", function () { }, function (error) { alert(error.message); });
};

this._calendarControl.onEventClick = function (args) {
var features = "location=no,menubar=no,status=no,toolbar=no";
window.open(Xrm.Page.context.getClientUrl() + "/main.aspx?etn=appointment&pagetype=entityrecord&id=" + encodeURIComponent(args.e.data.id), "_blank", features, false);
};

this._calendarControl.init();
}
};

Answer posted by Fernando
10 years ago.

It seems the lite version doe snot support this. I am now using the prod and it works,

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.