syncfusion/ej2-angular-ui-components

No examples for Datepicker popup options

sharathdaniel opened this issue · 2 comments

If you go to this documentation, there is no example how to implement those.

For eg: I want to change the popup position to open always to the top, i don't see how to do that.

Hi Sarathdaniel,

 

Thank you for reaching out to Syncfusion support.

 

We understand your concern regarding the placement of the EJ2 DatePicker popup. By default, the popup appears under the input component. If there's insufficient space to display it there, it will be positioned at the top of the input element.

 

To address your issue, we recommend adjusting the popup position or offset width in the open event of the DatePicker component. You can set the popup position X as "left" and Y as "top" in the open event, or alternatively, you can adjust the offsetX and offsetY positions with numeric values to suit your specific requirements.

 

For your convenience, here's a sample code snippet illustrating how to implement these changes:

open(args: PopupEventArgs) { args.popup.position = { X: "left", Y: "top" }; // changing popup position }

OR
open(args: PopupEventArgs) { args.popup.offsetX = 0; // changing the popup position with set any number value args.popup.offsetY = -150; }

You can also refer to our sample implementation on StackBlitz here and explore the API documentation here for further details.

 

We'll ensure to include this information in our upcoming documentation releases.

 

Regards,

Buvana S

We have addressed the query and are closing the ticket. If you need any further assistance, please feel free to contact us.