How to remove default resource from the schedule event window when creating a new event with [allowMultiple]="false"

How to remove default resource from the schedule event window when creating a new event with [allowMultiple]="false"




1 Reply

SR Swathi Ravi Syncfusion Team December 12, 2022 11:37 AM UTC

Hi Kunal,


You can remove default resource from the event window with the help of Schedule's popupOpen event as shown in the below snippet.


Sample: https://stackblitz.com/edit/angular-rxwjue?file=app.component.ts


[app.componet.ts]

 public onPopupOpen(argsPopupOpenEventArgs): void {

    if (args.type == 'Editor' && args.data && !args.data.Id) {

      let doctorElementHTMLInputElement=(args.element.querySelector('#DoctorId'as any).ej2_instances[0];

      doctorElement.value = null;

    }

  }


[app.component.html]

 <ejs-schedule #scheduleObj (popupOpen)="onPopupOpen($event)"> </ejs-schedule>



Regards,

Swathi Ravi



Loader.
Up arrow icon