Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.update = function(avEvent){
- me.avEvent.id = avEvent.id;// make sure the ids are the same
- //Deal with the messed up state of html datetime fields; I use timestamps like a real boy
- me.avEvent.start = avEvent.start === me.avEvent.start ? avEvent.start:Date.parse(me.avEvent.start);
- me.avEvent.end = avEvent.end === me.avEvent.end ? avEvent.end:Date.parse(me.avEvent.end);
- var index = me.avEvents.indexOf(avEvent);
- if (index > -1){
- me.avEvents[index] = me.avEvent;
- me.avEvent = {};
- }
- me.avEvent.editMode = avEvent.editMode = false;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement