Skip to content

DateTimePicker: Layout issues #49520

@dashkevych

Description

@dashkevych

Description

In WordPress 6.2, it seems like DateTimePicker comes with broken layout when displayed in editor sidebar.

Step-by-step reproduction instructions

  1. Import components and controls:
import { InspectorControls } from '@wordpress/block-editor';
import { DateTimePicker, PanelBody, PanelRow } from '@wordpress/components';
  1. Add components to edit.js in block:
<InspectorControls>
	<PanelBody title="Date">
		<PanelRow>
			<DateTimePicker
				currentDate={ dateTime }
				onChange={ updateDate }
				is12Hour={ true }
			/>
		</PanelRow>
	</PanelBody>
</InspectorControls>

Screenshots, screen recording, code snippet

DateTimePicker_layout_issue

Environment info

  • WordPress: 6.2
  • Chrome, Firefox, Safari
  • macOS

Also, tried with Gutenberg and without it, but result remains the same.

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] UI ComponentsImpacts or related to the UI component system[Package] Components/packages/components[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions