From 45d218994db4db70853734442ad4beab2ccc5095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Demirbilek?= Date: Sun, 1 Apr 2018 11:59:47 +0300 Subject: [PATCH] fix date_utils add params (#65) Please see https://github.com/frappe/gantt/blob/master/src/date_utils.js#L4 --- src/bar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bar.js b/src/bar.js index 4feeaa6..a73476a 100644 --- a/src/bar.js +++ b/src/bar.js @@ -260,13 +260,13 @@ export default class Bar { const new_start_date = date_utils.add( this.gantt.gantt_start, x_in_units * this.gantt.options.step, - 'hours' + 'hour' ); const width_in_units = bar.getWidth() / this.gantt.options.column_width; const new_end_date = date_utils.add( new_start_date, width_in_units * this.gantt.options.step, - 'hours' + 'hour' ); // lets say duration is 2 days // start_date = May 24 00:00:00