-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
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:
- Configure a date field with
withPortal: truein the field configuration - Render the
DateFieldcomponent with the portal enabled - Open browser developer tools and inspect the DOM structure
- Observe that the wrapper
divcreated byreact-datepickerhas 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
Desktop (please complete the following information):
- OS: Linux
- Browser: Chrome / Firefox / Edge
- Version: Latest