Skip to content

Getting "window is not defined" on Nuxt #101

@sindrepm

Description

@sindrepm

Thanks for a great component! I'm using it in my Nuxt project, but so far I've not been able to get it to work with SSR.

I'm getting a "ReferenceError: window is not defined" in "vue-datepicker.umd.js" function "VueComponent.created".

So I have to wrap it in a ClientOnly tag as a workaround, but this doesn't give the best UX because the input field is initially hidden when the page loads.

Anyway to fix this?

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