Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'DateUtils' only refers to a type, but is being used as a value here. #887

Closed
JonasGaldikas opened this issue Mar 29, 2019 · 4 comments · Fixed by #899
Closed

'DateUtils' only refers to a type, but is being used as a value here. #887

JonasGaldikas opened this issue Mar 29, 2019 · 4 comments · Fixed by #899

Comments

@JonasGaldikas
Copy link

JonasGaldikas commented Mar 29, 2019

Hello guys,

i thought i can reproduce error on sandbox, but it worked perfectly on it. Error i got is "'DateUtils' only refers to a type, but is being used as a value here." . Maybe someone has confronted similar error?

I am using --Select days on mouse enter-- 100% coppied from examples.

Maybe have any solutions? Thx in advance :)

@JonasGaldikas
Copy link
Author

Delete issue pls.

@FaganSC
Copy link

FaganSC commented Apr 8, 2019

Jonas, I'm getting the same thing. Is there something you found that you missed at first? It might be the same thing I haven't found. Thanks in advance!

@coreybruyere
Copy link

coreybruyere commented Apr 17, 2019

@JonasGaldikas what was the issue here and how did you resolve it?

@JonasGaldikas
Copy link
Author

JonasGaldikas commented Apr 18, 2019

@coreybruyere
@FaganSC

well i am not importing DateUtils as in example
import DayPicker, { DateUtils } from 'react-day-picker

i only import
import DayPicker from 'react-day-picker'

and instead of using
from && DateUtils.isDayBefore(day, from);

i use
from && DayPicker.DateUtils.isDayBefore(day, from);

I hope it helped you guys ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants