Skip to content

DateField: withPortal creates unclassed wrapper div breaking layout #6203

@octavio-parozlabs

Description

@octavio-parozlabs

Describe the bug

When the withPortal property is activated in the DateField component, react-datepicker creates an additional wrapper div without CSS classes that breaks the layout and styles for component consumers. The wrapper div appears without the expected react-datepicker-wrapper class, causing layout issues with flex containers and inconsistent styling.

To Reproduce
Steps to reproduce the behavior:

  1. Configure a date field with withPortal: true in the field configuration
  2. Render the DateField component with the portal enabled
  3. Open browser developer tools and inspect the DOM structure
  4. Observe that the wrapper div created by react-datepicker has no CSS classes applied

Expected behavior
The wrapper div created by react-datepicker should have appropriate CSS classes (such as react-datepicker-wrapper and w-full) to maintain layout consistency and not break consumer styles. The wrapper should respect the flex container layout from the parent component.

Screenshots

Image

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Chrome / Firefox / Edge
  • Version: Latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions