Skip to content

Styles not being applied when component is inside a collapsible element #37

Open
@luizcieslak

Description

@luizcieslak

Hi, great lib! It is helping me very much.

I notice that, when the <DatePicker /> or <DateRangePicker /> is placed inside a collapsible element which in the first render has a display: none;, it doesn't render correctly.

Here is the reproduced example in codesandbox

Going further, comparing with the rendered element in the docs, I see that the wide class is not applied to .nice-dates-day and .nice-dates-grid is rendered with height: 6px.

Perhaps this happens because the initial width of the ref element is 0 and by that it can't render correctly?

I can open a PR setting a mininum height for .nice-dates-day and .nice-dates-grid but I'd like to discuss it here before to check if this is the best option available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions