Skip to main content

inclusiveEnd

Description​

Optional. Shows end dates as the last day of a task

Gantt stores the task end as the moment the work ends, which is the start of the next day. For example, a task that runs from Monday to Friday has end set to Saturday 00:00. With inclusiveEnd, such a task is shown as Monday → Friday.

The option changes only how dates are shown and entered. The stored data, the chart bars, task durations, events and the serialize() output stay the same.

The option applies to every date that closes a period of work: the task end and base_end, the end of a task segment, the deadline, and the date of a finish-side constraint. For the full list, for the calendar behaviour and for the conversion in custom code, see Inclusive end dates.

Usage​

inclusiveEnd?: boolean;

Parameters​

  • true - end dates are shown as the last working day of a task. A date entered by a user is saved one day later
  • false - (default) end dates are shown as stored
note

The option works only with durationUnit: "day". For the "hour" unit, Gantt turns the option off.

Example​

import { getData } from "./common/data";
import { Gantt } from "@svar-ui/react-gantt";

const data = getData();

function App() {
return (
<Gantt tasks={data.tasks} links={data.links} inclusiveEnd={true} />
);
}

export default App;

Related sample:

Related articles: