Skip to content

Commit

Permalink
fix date_utils add params (frappe#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbtek authored and netchampfaris committed Apr 1, 2018
1 parent 9759159 commit 45d2189
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 45d2189

Please sign in to comment.