From c2ee643069800073b5e6a68fc3c930a5af652ab2 Mon Sep 17 00:00:00 2001 From: Taliesin Sisson Date: Fri, 2 May 2014 12:42:27 +0100 Subject: [PATCH] Support start dates and end dates that do not have a value (e.g. task that has not finished for example) --- sources/dhtmlxgantt.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/dhtmlxgantt.js b/sources/dhtmlxgantt.js index 1846b192..b355078a 100644 --- a/sources/dhtmlxgantt.js +++ b/sources/dhtmlxgantt.js @@ -4114,7 +4114,10 @@ gantt._get_task_coord = function(task, to_start, x_correction){ x_correction = x_correction || 0; var isMilestone = (task.type == this.config.types.milestone); - var x = this.posFromDate((to_start || isMilestone) ? task.start_date : task.end_date), + + var fromDate = (to_start || isMilestone) ? (task.start_date === undefined ? this._min_date : task.start_date) : (task.end_date === undefined ? this._max_date : task.end_date); + + var x = this.posFromDate(fromDate), y = this._y_from_ind(this._get_visible_order(task.id)); if(isMilestone){