We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

popupOpen event returns type RecurrenceAlert when using Del key on recurrence events

Hello,

Whenever I double click on a recurring appointment, the popupOpen event has a type 'RecurrenceAlert' and which the popup shows up as edit.

Whenever I use the 'Del' keyboard button after selecting a recurring appointment, the popupOpen event also has a type 'RecurrenceAlert' and the popup shows up as delete. 

Currently I can't differentiate what action the current popup will be on recurring appointments unless I try to read the content of the popup and comparing for example the title which I would like to avoid.

I will also combine this with multi selected appointments.

Is there an other way to check what kind of action (edit or delete) is triggered on recurrences on popupOpen?


3 Replies 1 reply marked as answer

VR Vijay Ravi Syncfusion Team January 13, 2023 02:36 PM UTC

Hi Pol


you can determine what kind of action is triggered on recurrence using the popupOpen event, as demonstrated in the

code snippet below,


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


[app.component.ts]

  public onPopupOpen(argsPopupOpenEventArgs) {

    if (args.type === 'RecurrenceAlert') {

      if ( args.element.querySelector('.e-dlg-header').innerHTML === 'Delete Event') 

      {

        console.log('Delete');

      } 

      else if ( args.element.querySelector('.e-dlg-header').innerHTML === 'Edit Event') 

      {

        console.log('Edit');

      }

    }

  }


Regards,

Vijay Ravi



PO Pol January 13, 2023 03:01 PM UTC

Hello,


Thank you for your suggestion, but is there no other way to determine which action was triggered.
As querying on the popup element does not seem to be the most desirable solution for me.

Regards




RV Ravikumar Venkatesan Syncfusion Team January 17, 2023 08:07 PM UTC

Pol,


Sample: https://stackblitz.com/edit/ej2-angular-schedule-find-recurrence-alert-action?file=src%2Fapp.component.ts


You can achieve your requirement with help of the currentAction property of the Schedule as shown in the below code snippet.


[app.component.ts]

  public onPopupOpen(argsPopupOpenEventArgs) {

    if (args.type === 'RecurrenceAlert') {

      console.log(this.scheduleObj.currentAction);

    }

  }



Marked as answer
Loader.
Live Chat Icon For mobile
Up arrow icon