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

Changing start date of event

Asked by Alex
10 years ago.

Hello All,

I'm trying to change start date of event doing this:

var ev = window.parent.dp.events.find('123'); // it exists

alert(ev.start().toString('dd.MM.yyyy HH:mm'));
ev.start(new DayPilot.Date('2009-03-04T12:00'));
alert(ev.start().toString('dd.MM.yyyy HH:mm'));

But it won't change

Version: 759

Answer posted by Dan Letecky [DayPilot]
10 years ago.

Changes of the key properties (id, start, end, resource, text) doesn't have an immediate effect because it would cause problems if you modified events that are already visible in the calendar/scheduler.

The changes are stored internally and the DayPilot.Event object is marked as dirty.

The change is committed when you call dp.events.update(e). This is the recommended way.

You can also commit the changes manually using e.commit().

See also:
http://api.daypilot.org/daypilot-event-start/
http://api.daypilot.org/daypilot-scheduler-events-update/

Comment posted by Alex
10 years ago.

Ok. Thank you

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