Gantt Edit Dialog Value change Listeners

Hi, 

I would like to know how to listeners for StartDate value changes 

in https://ej2.syncfusion.com/angular/documentation/gantt/how-to/open-add-edit-dialog  

Image_8474_1696836665500

Thanks 



1 Reply

UA Udhayakumar Anand Syncfusion Team October 13, 2023 11:48 AM UTC

Ahmed


Greetings from Syncfusion


We have thoroughly examined your inquiry and determined that your objective can be attained by utilizing the actionBegin event, specifically with the requestType parameter set to 'beforeOpenEditDialog.' Within this event context, you have the capability to associate your custom function with the change event of the datePickerEdit. Consequently, this function will be invoked each time there is a modification in the date selection. You can access the pertinent code snippet and sample link in the resources provided below.


Code Snippet:

/*app.component.ts*/

 actionBegin(args): void {

    // Add your custom function to the "change" event

    if (args.requestType == 'beforeOpenEditDialog') {

      args.General.StartDate.change = function () {

        alert('Change event was triggered');

      };

    }

  }

 


Sample Link : https://stackblitz.com/edit/angular-ya5pfx-z6dsxb?file=src%2Fapp.component.ts


Regards,

Udhayakumar


Loader.
Up arrow icon