roto93 / react-native-neat-date-picker

An easy to use date picker for react native.
MIT License
52 stars 33 forks source link

Got an Error of a depreciated package #7

Closed sheggietyn closed 2 years ago

sheggietyn commented 2 years ago

EventEmitter.removeListerner('didUpdateDimensions,') method has been deprecated, please instead use remove() on the subscription returned by EventEmitter.addListener

that was the error i got

and secondly the output date shows only Day it didn't show the full date

roto93 commented 2 years ago

Hi, Are you using Expo? I guess thehe EventEmitter error is because I didn't use the latest version of react-native-modal for my date picker. (I saw this PR) Because of this reason, I have to downgrade the react-native-modal in order to use it. I'm still seeking a good way to handle the version problem. Otherwise we have to wait for Expo SDK includes RN > 0.65. At that time, the latest rn-modal version should work.

For the second question, yes the output is a javascript Date object. This decision was because everyone can get their information using Date prototype method. But some people like you ask to get the full date string so I am now considering adding this feature. Thank you for your suggestion. 👍

roto93 commented 2 years ago

I have updated a new feature in version 1.2.0. Now you can get the full date easily. And I changed the way to use onConfirm prop. Please check README to see how to use it.

sheggietyn commented 2 years ago

thanks for the update i will check it out now

sheggietyn commented 2 years ago

i still got this error when i tried again

EventEmitter.removeListerner('didUpdateDimensions,') method has been deprecated, please instead use remove() on the subscription returned by EventEmitter.addListener

roto93 commented 2 years ago

I can expect that because I only dealt with you second question. I've tried the first one but I cannot reproduce it. Is it just a warning (i.e. you can still use it) or an Error that makes the date picker totally unavailable? Though I believe it is the dependency that causing this error, could you provide more information or a minimal reproduction?

arkanos commented 2 years ago

Hi @roto93,

After some investigation, I have found that this warning was caused by react-native-modal package, at least on my project.

I have tried to reproduce it within another project with a clean expo installation, with react-native-modal latest version (13.0.1) and seems everything works as expected. No sign of warning at all after a while.

Looks like the library was using a deprecated method and was fixed in the latest updates.

Hopes this helps a bit!

roto93 commented 2 years ago

Hi all, after the version 1.3.1 this warning is gone. Please update the package. Thank you for your advises 😄.