Reactive form with Editor template

Hi Teams,

I work with the schedule component from SyncFusion and i would like to know if it's possible to work with reactive form inside popup editor event ?

Thanks you

Best regards,

3 Replies 1 reply marked as answer

VM Vengatesh Maniraj Syncfusion Team June 19, 2020 12:31 PM UTC

Dear Customer, 

Greetings from Syncfusion Support. 

We have validated your requirement “is Editor template support Reactive Forms” at our end and we let you know that we can use the Reactive forms in the Schedule’s Editor Template. We have integrated the Reactive forms in editor template in the below sample by referring Reactive Forms site. Please refer to the below sample. 
 

Note: In the above sample, we just integrate the Reactive Forms with editor template so while pressing the save button, the event will not save in the scheduler.  

You can make the forms as per your requirement in the Editor template and please get back to us if you need any further assistance.  

Regards, 
Vengatesh  
 


Marked as answer

C c June 23, 2020 09:24 AM UTC

Hi Team, Great examples !

But How I can retrieve my value inside the method 'onPopupClose' ? And too, how disable button 'save' when my form is invalid ? 

Thanks you so much :) 


VM Vengatesh Maniraj Syncfusion Team June 24, 2020 08:50 AM UTC

Dear Customer, 

Thanks for the update. 
 
How I can retrieve my value inside the method 'onPopupClose' ? 
You can retrieve the values from its corresponding form elements like below code 

 public onPopupClose(args) { 
        this.startDate = null; 
        this.endDate = null; 
        alert(args.element.querySelector('.name').value); 
    }   


how disable button 'save' when my form is invalid ? 
We can disable the button by making use of its disabled property.  
(document.querySelector('.e-event-save') as any).ej2_instances[0].disabled = true 
 
You can set true/false to the property disabled based on your requirement. 
 
Please try the above solution and get back to us if you need any further assistance. 

Regards, 
Vengatesh  


Loader.
Up arrow icon