In angular 6 i have many custom function so can call that function after add new task with this method onTimeRangeSelected. Example Like Below : 
onTimeRangeSelected: function (args) {
      var dp = this;
      DayPilot.Modal.prompt("Create a new task:", "").then(function(modal) {
        dp.clearSelection();
        if (!modal.result) { return; }  
         dp.events.add(new DayPilot.Event({          
          start: args.start,
           end: args.end,
           id: DayPilot.guid(),
           resource: args.resource,
           text: modal.result
         }));
      });
    this.Callfunctin();
    },