Properties not functioning in add event
6 years ago.
Using the following to create a new event by clicking or creating a range on the scheduler. The event gets created, but none of the properties for backPattern, repeat, backColor, or cssClass have any effect.
dp.onTimeRangeSelected = function (args) {
var modal = new DayPilot.Modal();
modal.onClosed = function(args) {
dp.clearSelection();
var data = args.result;
if (data.gender == 'M') {var bcolor ='blue'} else {var bcolor = 'pink'};
if (data && data.result === "OK") {
dp.clearSelection();
var e = new DayPilot.Event({
start: data.start,
end: data.end,
id: data.id,
resource: data.resource,
barColor: bcolor,
html: data.html,
detail: data.detail,
cssClass: 'extgame',
backColor: '#ffffff',
backImage: '/media/images/tweed.png',
backRepeat: 'repeat',
text: data.text
});
dp.events.add(e);
dp.message(data.message);
}
};
modal.showUrl("newcalevent.php?start=" + args. start + "&end=" + args.end + "&resource=" + args.resource + "&userid=" + '<?php echo $UserID;?>');
};
DayPilot