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

How to close a Schedule dialog box?

Specifying  custom header, content and footer templates:

                quickInfoTemplates={{
                  header: quickInfoHeaderTemplate,
                  content: quickInfoContentTemplate,
                  footer: quickInfoFooterTemplate
                }

  function quickInfoFooterTemplate(props: any): JSX.Element {
    return (
      // <div></div>
      <div className="e-popup-footer" style={minWidth: '' }}>
        <DefaultButton
          className="e-close e-event-cancel"
          style={marginRight: '5px' }}
          type={ButtonType.CANCEL}
          onClick={handleModalClose}
        >
          CANCEL
        </DefaultButton>
        <PrimaryButton
          style={marginLeft: '5px' }}
          type={ButtonType.SUBMIT}
          onClick={() => editAppointment(props)}
        >
          DONE
        </PrimaryButton>
      </div>
    );
  }

  function editAppointment(props: Appointment) {
    console.log('update props: 'props);

  }


What's the best/idiomatic way of closing the popup?

We've tried things like  this inside our editAppointment code
QuickPopups.quickDialogClass.quickPopupHide(true);

Which just don't work.

Can  you help please?

Thanks!

5 Replies

KK Karthigeyan Krishnamurthi Syncfusion Team September 20, 2019 08:49 AM UTC

Hi Ken,  
 
Syncfusion greetings. 
 
We have prepared the below sample to close the quickpopup based on its button click. 
 
footer(props) { 
    return (<div> 
      { 
        props.elementType === 'cell' ? 
          <div className="e-cell-footer"> 
            <button className="e-event-details" title="Extra Details">Extra Details</button> 
            <button className="e-event-create" title="Add">Add</button> 
            <button className="e-event-cancel" onClick={this.onQuickInfoClose.bind(this)} title="Close">Close</button> 
 
          </div> 
          : 
          <div className="e-event-footer"> 
            <button className="e-event-edit" title="Edit">Edit</button> 
            <button className="e-event-delete" title="Delete">Delete</button> 
            <button className="e-event-cancel" onClick={this.onQuickInfoClose.bind(this)} title="Close">Close</button> 
          </div> 
      } 
    </div> 
    ); 
  } 
 
  onQuickInfoClose = () => { 
    this.scheduleObj.quickPopup.quickPopupClose(); 
  }; 
  
Regards, 
Karthi 



KG Ken Guest September 20, 2019 09:54 AM UTC

Thank you - that's exactly what I needed!


KK Karthigeyan Krishnamurthi Syncfusion Team September 23, 2019 04:11 AM UTC



AR Arun June 2, 2020 12:42 PM UTC

how to close editor pop up window ?


RV Ravikumar Venkatesan Syncfusion Team June 3, 2020 10:34 AM UTC

Hi Arun, 

Greetings from Syncfusion support. 

We have validated your reported query “how to close editor pop up window ?” at our end. We can close the editor window manually with the help of the closeEditor public method of the EJ2 React Schedule like the below code. We have prepared a sample for your reference it can be available below. 

[index.js] 
  close(args) { 
    alert('Editor window is closing now.'); 
    this.scheduleObj.closeEditor(); 
  } 


Kindly try the above sample and get back to us If you would require further assistance. 


Regards, 
Ravikumar Venkatesan 


Loader.
Up arrow icon