Skip to content

DateTimePickerControl: Use popoverProps.placement instead of position for dropdown #38447

@mattsherman

Description

@mattsherman

Part of #37784

Issue Description:

The position drop of wp.components.Dropdown is deprecated as of WordPress 6.2. popoverProps.placement should be used instead.

DateTimePickerControl should be updated so that it uses popoverProps.placement and doesn't produce warnings in the browser console.

To reproduce

  1. Enable the block-based product editor
  2. Go to Products > Add New
  3. Go to the Pricing tab
  4. Enter a List price and Sale price
  5. Enable Schedule sale
  6. Note the following warning in the browser console.
`position` prop in wp.components.Dropdown is deprecated since version 6.2. Please use `popoverProps.placement` prop instead. Note: Note that the `position` prop will override any values passed through the `popoverProps.placement` prop.

Acceptance criteria

  • The warning above is no longer shown when following the above reproduction steps
  • DateTimePickerControl continues to function as expected

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions