I have used DialogComponent and its opening my custom Holiday List popup. How to set its position ?

LEASE OF THE HOUSE ON MONTHLY TENANCY

I have used DialogComponent and its opening my custom Holiday List popup. How to set its position ? Currently its opening at bottom half of the page. It need to move it to top of the page.

 top of the page.Image_8401_1704531812669


1 Reply

AK Ashokkumar Karuppasamy Syncfusion Team January 8, 2024 12:11 PM UTC

Hi Ravi,

You can fulfill your requirement by utilizing the schedule popupOpen event. If you use the dialog component's position property, you can open it on the default top side. The attached sample below demonstrates the solution. Please give it a try and let us know if you need any further assistance.

Sample: https://stackblitz.com/edit/schedule-dialog-top-align-whmmzr?file=index.js,index.css,index.html

[index.js]

  const onPoupOpen  = (args=> {

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

        const dialogInstance = args.element.ej2_instances[0];

        dialogInstance.position = { X: 'center'Y: 'top' };

        dialogInstance.dataBind();

      }

    }

    return (<div className='schedule-control-section'>

      <div className='col-lg-12 control-section'>

        <div className='control-wrapper'>

          <ScheduleComponent width='100%' height='650px' ref={scheduleObj} popupOpen={onPoupOpen} selectedDate={new Date(2021115)} eventSettings={dataSource: data }}>

 


Regards,
Ashok


Loader.
Up arrow icon