gantt-task-react
gantt-task-react copied to clipboard
Extend date task to end of the day
Is there a way to extend the to/end date bar to the end of the day?
The bar ends at the beginning of June 3rd
The outcome can be attained by adding hours to date.
I changed the end code snippet date, by the way.
Before:
const tasks: Task[] = timeoffs.map(timeoff => {
return {
start: new Date(timeoff.start_date),
end: new Date(timeoff.end_date),
name: timeoff.user.full_name,
id: timeoff.id,
type: 'task',
isDisabled: true,
styles: {
backgroundColor: '#333366',
backgroundSelectedColor: '#ff6633'
}
};
});
After:
const tasks: Task[] = timeoffs.map(timeoff => {
return {
start: new Date(timeoff.start_date),
end: new Date(new Date(timeoff.end_date).setHours(23, 59)),
name: timeoff.user.full_name,
id: timeoff.id,
type: 'task',
isDisabled: true,
styles: {
backgroundColor: '#333366',
backgroundSelectedColor: '#ff6633'
}
};
});