react-modern-calendar-datepicker icon indicating copy to clipboard operation
react-modern-calendar-datepicker copied to clipboard

Cannot read properties of null (reading 'removeEventListener') at index.js:1

Open SaeedEsk opened this issue 4 years ago • 8 comments

index.js:1 Uncaught TypeError: Cannot read properties of null (reading 'removeEventListener') at index.js:1 at HTMLUnknownElement.callCallback (react-dom.development.js:3945) at Object.invokeGuardedCallbackDev (react-dom.development.js:3994) at invokeGuardedCallback (react-dom.development.js:4056) at flushPassiveEffectsImpl (react-dom.development.js:23543) at unstable_runWithPriority (scheduler.development.js:468) at runWithPriority$1 (react-dom.development.js:11276) at flushPassiveEffects (react-dom.development.js:23447) at performSyncWorkOnRoot (react-dom.development.js:22269) at react-dom.development.js:11327 at unstable_runWithPriority (scheduler.development.js:468) at runWithPriority$1 (react-dom.development.js:11276) at flushSyncCallbackQueueImpl (react-dom.development.js:11322) at flushSyncCallbackQueue (react-dom.development.js:11309) at scheduleUpdateOnFiber (react-dom.development.js:21893) at dispatchAction (react-dom.development.js:16139) at Header.jsx:21

this error occurs when the date picker component is removed from Dom

SaeedEsk avatar Sep 07 '21 11:09 SaeedEsk

index.js:1 Uncaught TypeError: Cannot read properties of null (reading 'removeEventListener') at index.js:1 at HTMLUnknownElement.callCallback (react-dom.development.js:3945) at Object.invokeGuardedCallbackDev (react-dom.development.js:3994) at invokeGuardedCallback (react-dom.development.js:4056) at flushPassiveEffectsImpl (react-dom.development.js:23543) at unstable_runWithPriority (scheduler.development.js:468) at runWithPriority$1 (react-dom.development.js:11276) at flushPassiveEffects (react-dom.development.js:23447) at performSyncWorkOnRoot (react-dom.development.js:22269) at react-dom.development.js:11327 at unstable_runWithPriority (scheduler.development.js:468) at runWithPriority$1 (react-dom.development.js:11276) at flushSyncCallbackQueueImpl (react-dom.development.js:11322) at flushSyncCallbackQueue (react-dom.development.js:11309) at scheduleUpdateOnFiber (react-dom.development.js:21893) at dispatchAction (react-dom.development.js:16139) at Header.jsx:21

this error occurs when the date picker component is removed from Dom

check here: https://github.com/Kiarash-Z/react-modern-calendar-datepicker/issues/286#issuecomment-927020181

amir04lm26 avatar Sep 25 '21 06:09 amir04lm26

Any update on this bug? I am having the same error.

ningxie1991 avatar Sep 27 '21 15:09 ningxie1991

Any update on this bug? I am having the same error too. Just made all as in getting started

This appears when I select a date.

ryskin avatar Oct 12 '21 05:10 ryskin

Any update on this bug? I am having the same error too. Just made all as in getting started

This appears when I select a date.

You can either downgrade to react 16 or Fix the library by yourself or use my forked version.

https://github.com/amir04lm26/react-modern-calendar-date-picker

The above link refers to my forked version, You need to run this command and copy the lib folder to your project as a local 3rd party library. npm i && npm run build

amir04lm26 avatar Oct 12 '21 07:10 amir04lm26

Hi @amir04lm26 , Your forked version is working smoothly and seems there is no bugs. do you have any plans on releasing a npm package? at least until main team fix occurred bugs and release new version of their own package

Rezaabdi78 avatar Oct 24 '21 10:10 Rezaabdi78

Hi @amir04lm26 , Your forked version is working smoothly and seems there is no bugs. do you have any plans on releasing a npm package? at least until main team fix occurred bugs and release new version of their own package

Hi Rezaabdi78, As you had requested, I've published the forked version that fixes the compatibility with react v17 and, here's the package: https://www.npmjs.com/package/@amir04lm26/react-modern-calendar-date-picker

amir04lm26 avatar Oct 24 '21 11:10 amir04lm26

Is this package abandoned?

lightwave avatar Nov 18 '21 18:11 lightwave

Hi @amir04lm26 , Your forked version is working smoothly and seems there is no bugs. do you have any plans on releasing a npm package? at least until main team fix occurred bugs and release new version of their own package

Hi Rezaabdi78, As you had requested, I've published the forked version that fixes the compatibility with react v17 and, here's the package: https://www.npmjs.com/package/@amir04lm26/react-modern-calendar-date-picker

God bless you 👍 ❤️

fariborz0015 avatar May 01 '22 22:05 fariborz0015