Skip to content

Commit

Permalink
Revert "Fixed bug: can't add task on a selected date se701g2#232"
Browse files Browse the repository at this point in the history
This reverts commit 75bf48f.
  • Loading branch information
rmoradc committed Apr 25, 2020
1 parent 8b40dcf commit 11e2d7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doto-frontend/src/components/pages/Calendar/TaskScheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const addTaskToSchedule = (newTask, existingTasks, currDate) => {
}
}

newTask.startDate = cTask ? newTask.dueDate : minDate;
newTask.startDate = cTask ? cTask.endDate : minDate;

newTask.startDate = new Date(newTask.startDate.getTime());

Expand All @@ -76,7 +76,7 @@ const addTaskToSchedule = (newTask, existingTasks, currDate) => {
}

newTask.endDate =
(cTask && new Date(newTask.dueDate.getTime() + newTask.duration * MILLISECONDS_PER_MINUTE)) ||
(cTask && new Date(cTask.endDate.getTime() + newTask.duration * MILLISECONDS_PER_MINUTE)) ||
new Date(minDate.getTime() + newTask.duration * MILLISECONDS_PER_MINUTE);

return {
Expand Down

0 comments on commit 11e2d7c

Please sign in to comment.