nextui-org / nextui

🚀 Beautiful, fast and modern React UI library.
https://nextui.org
MIT License
20.13k stars 1.17k forks source link

[BUG] - Date Range Picker TypeError (Error on click the right corner) #3008

Closed DanielReyes03 closed 4 weeks ago

DanielReyes03 commented 1 month ago

NextUI Version

2.3.6

Describe the bug

When i clicked the bottom right corner of the date range picker before or after select a new range of dates. The component fallbacks an error

Unhandled Runtime Error
TypeError: Failed to execute 'createTreeWalker' on 'Document': parameter 1 is not of type 'Node'.

This occurs on the main website and when using the component in my own project

Your Example Website or App

https://nextui.org/docs/components/date-range-picker

Steps to Reproduce the Bug or Issue

  1. Go to the Date range picker
  2. Click in the bottom right corner of the component

Expected behavior

As a user, i don't expect to have this error on the component.

Screenshots or Videos

https://github.com/nextui-org/nextui/assets/58609880/bfcbe55a-d70f-4113-8237-0268321d6873

Operating System Version

macOS

Browser

Chrome

linear[bot] commented 1 month ago

ENG-841 [BUG] - Date Range Picker TypeError (Error on click the right corner)

azharisubroto commented 1 month ago

I have the same issue

zillBoy commented 3 hours ago

Hi, I also received the same issue in my next.js project using "@nextui-org/react": "^2.3.6"

Unhandled Runtime Error
TypeError: Failed to execute 'createTreeWalker' on 'Document': parameter 1 is not of type 'Node'.

The way I solved it was by installing the package as individual npm install @nextui-org/date-picker, and then using that import in my project.

Before I was using global import {DateRangePicker} from "@nextui-org/react"; which gave me the error, thank you

wingkwong commented 3 hours ago

@zillBoy Just FYI. This issue has been fixed and our latest version is v2.4.2.