Hey
if i make special changes in the lightbox (anschluss = 2) i want to add 2 more hours automatically on saving. If i have 08:00 - 09:00 i want to save 08:00 - 11:00. How can i realize that?
scheduler.attachEvent("onEventSave", function(id, data){
if (data.anschluss == 2) {
var B = new Date(data.end_date);
var B1 = B.getYear();
var B2 = B.getMonth()+1;
var B3 = B.getDate();
var B4 = B.getHours()+2;
var B5 = B.getMinutes();
var B6 = B.getSeconds();
if (B3 < 10) B3 = "0" + B3;
if (B2 < 10) B2 = "0" + B2;
if (B4 < 10) B4 = "0" + B4;
if (B5 < 10) B5 = "0" + B5;
if (B6 < 10) B6 = "0" + B6;
if (B1 < 1000) B1+=1900;
var newDatum = new Date(B1,B2,B3,B4,B5,B6);
scheduler.getEvent(id).end_date = newDatum;
}
return true;
});
Thank you