Align the position of the popup to the left side of the input element.

Hi Syncfusion Team,

By default, the popup is aligned to the right of the input. I want it to be aligned relative to the left side of the input element.
Image_3118_1692777688375
Expect:
Image_8514_1692777766133
Is there any way to achieve my request? 

Thank you for your assistance.


2 Replies 1 reply marked as answer

KP Kokila Poovendran Syncfusion Team August 24, 2023 11:53 AM UTC

Hi Ton That Hung,


Thank you for reaching out to us at Syncfusion!


We understand that you're looking to align the popup to the left side of the input element in the DateRangePicker component.


We've reviewed your query and have prepared a tailored sample to address your specific requirement. Please take a look at the code snippet below:


const onOpen = (args=> {

    args.popup.position.properties.X = 'left';

  };

  return (

    <div className="control-pane">

      <div className="control-section">

        <div className="daterangepicker-control-section">

          <DateRangePickerComponent open={onOpen}></DateRangePickerComponent>

        </div>

      </div>

    </div>

  );

 



To provide you with a visual representation, we've also created a sample for you on StackBlitz. You can explore and experiment with the code in action: 


Samplehttps://stackblitz.com/edit/react-aqqx6c-acktv6?file=index.js


For more details about the API and the open event, please refer to our documentation:

APIhttps://ej2.syncfusion.com/react/documentation/api/datepicker/#open


Screen shot: 



R
egards,

Kokila Poovendran.


Marked as answer

TT Ton That Hung replied to Kokila Poovendran August 25, 2023 07:19 AM UTC

Thanks for your support.


Loader.
Up arrow icon