Skip to content

Conversation

angelvilaplana
Copy link

Description (*)

This pull request fixes an issue where the Magento datepicker does not display correctly inside admin modal dialogs.
For example, this affected the Advanced Pricing section when editing or creating a product from the admin panel.

image

To solve this problem, the _findPos method of $.datepicker has been overridden to use getBoundingClientRect() for elements inside .modal-slide. This ensures that the datepicker is positioned correctly relative to the modal.

image

Related Pull Requests

No related pull requests, but a related commit: 15ce386#diff-19864376467a02afb70b63ab2fe8ca2c232de016f4ae9593c61f7af293dec403

Fixed Issues (if relevant)

  1. Fixes 2.4.8-p2 datepicker - position is on the top of the website #40169 - restores proper datepicker behavior in admin modal dialogs while preserving the current logic for general datepickers. This resolves the previous issue where fixes for general dialogs broke modal dialogs.

Manual testing scenarios (*)

  1. Log in to the Magento admin panel.
  2. Navigate to Catalog → Products.
  3. Click Edit on any existing product, or Add Product to create a new one.
  4. In the Price section, click Advanced Pricing.
  5. Inside the modal, click in one of the date fields. The datepicker should appear correctly positioned relative to the input field.

Questions or comments

No additional comments.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Copy link

m2-assistant bot commented Oct 12, 2025

Hi @angelvilaplana. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.
❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@angelvilaplana
Copy link
Author

@magento run all tests

@angelvilaplana
Copy link
Author

@magento run Static Tests

@angelvilaplana
Copy link
Author

@magento run all tests

@engcom-Hotel
Copy link
Contributor

Hello @angelvilaplana,

Thank you for your contribution!

It appears that this PR is related to the #40169 but the issue is not reproducible for us. Please refer to the this #40169 (comment). And let us know if we missed anything.

Meanwhile we are moving this PR On Hold.

Thank you

@angelvilaplana
Copy link
Author

Hello @engcom-Hotel,

After you mentioned that you couldn't reproduce the issue, I tested it again, and I'm still experiencing the same problem.
I’m sharing a video showing the problem:

Peek.2025-10-14.16-48.webm

Because of this, I tried using another browser, since I normally use Chrome, I tested it in Firefox to compare.

After doing these tests, I can confirm that the error doesn't occur in Firefox.

image

I also tried using Chrome in incognito mode to check if an extension could be causing the problem, but the same bug appears there as well.

I'm using Fedora, so I'm not sure if the operating system could have any influence on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

2.4.8-p2 datepicker - position is on the top of the website

2 participants