[app.component.html]
<ejs-gantt id="ganttDefault"
[dayWorkingTime]="dayWorkingTime" [includeWeekend]="true" [enablePredecessorValidation]="false">
</ejs-gantt>
[app.component.ts]
export class AppComponent {
//...
public dayWorkingTime: object;
public ngOnInit(): void {
//...
this.dayWorkingTime = [{ from: 0, to: 24 }];
}
} |
app.component.html]
//…
<ejs-gantt id="gantt" #gantt (taskbarEditing)="taskbarEditing($event)" (taskbarEdited)=" taskbarEdited($event)" </ejs-gantt>
[app.component.ts]
//…
public taskbarEditing(args: any){
if (args.taskBarEditAction == "ParentDrag" || args.taskBarEditAction == "ChildDrag") {
this.gantt.isInPredecessorValidation = true;
}
}
public taskbarEdited(args: any){
if (args.taskBarEditAction == "ParentDrag" || args.taskBarEditAction == "ChildDrag") {
this.gantt.isInPredecessorValidation = false;
}
}
|
app.component.html]
//…
<ejs-gantt id="gantt" #gantt (taskbarEditing)="taskbarEditing($event)" (taskbarEdited)=" taskbarEdited($event)" </ejs-gantt>
[app.component.ts]
//…
public taskbarEditing(args: any){
if (args.taskBarEditAction == "ParentDrag" || args.taskBarEditAction == "ChildDrag" ||
args.taskBarEditAction == "RightResizing" || args.taskBarEditAction == "LeftResizing") {
this.gantt.isInPredecessorValidation = true;
}
}
public taskbarEdited(args: any){
if (args.taskBarEditAction == "ParentDrag" || args.taskBarEditAction == "ChildDrag" ||
args.taskBarEditAction == "RightResizing" || args.taskBarEditAction == "LeftResizing") {
this.gantt.isInPredecessorValidation = false;
}
}
|