gantt.attachEvent("onAfterTaskAdd", function(id, target) {
var newTask = gantt.getTask(id),
url = '../../gantty_task.php'
console.log(JSON.stringify(newTask))
jQuery.ajax({ <call to server to save new task> ...
.....
When adding task I enter “30 January 2016” in “Task Start”. The “console.log” from above displays
… “start_date”:“2016-01-29T17:00:00.000Z”, …
Is there a way to disable time zone adjustment and simply pass the date entered in the lightbox to the server? I was not able to find a simple solution to this. There is no need to make “Task Start” time zone dependent in this application.
var newTask = gantt.getTask(id),
url = '../../gantty_task.php'
var sendData = gantt.copy(newTask);
var dateToStr = gantt.date.date_to_str("%d-%m-%Y %H:%i");
sendData.start_date = dateToStr(sendData.start_date);
sendData.end_date = dateToStr(sendData.end_date);
jQuery.ajax({ <call to server to save new task using sendData object> ...[/code]