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

error seconDate.getFullYear is not a function #52

Closed
arwysyah opened this issue Mar 4, 2021 · 9 comments
Closed

error seconDate.getFullYear is not a function #52

arwysyah opened this issue Mar 4, 2021 · 9 comments
Labels
Can't reproduce question Further information is requested

Comments

@arwysyah
Copy link

arwysyah commented Mar 4, 2021

error getInitialIndex

ExceptionsManager.js:179 TypeError: secondDate.getFullYear is not a function

This error is located at:
in Calendar (at StockForm.js:216)
in RCTView (at View.js:34)
in View (at StockForm.js:188)
in RCTView (at View.js:34)
in View (at StockForm.js:178)
in RCTView (at View.js:34)
in View (at StockForm.js:403)
in RCTView (at View.js:34)
in View (at StockForm.js:402)
in RCTView (at View.js:34)
in View (at ScrollView.js:1124)

ExceptionsManager.js:179 TypeError: secondDate.getFullYear is not a function

This error is located at:
in Calendar (at DatePickerModalContent.tsx:186)
in RCTView (at View.js:34)
in View (at createAnimatedComponent.js:165)
in AnimatedComponent (at createAnimatedComponent.js:215)
in ForwardRef(AnimatedComponentWrapper) (at AnimatedCrossView.tsx:32)
in RCTView (at View.js:34)
in View (at AnimatedCrossView.tsx:31)
in AnimatedCrossView (at DatePickerModalContent.tsx:183)
in DatePickerModalContent (at DatePickerModal.tsx:124)
in RCTView (at View.js:34)
in View (at DatePickerModal.tsx:101)
in RCTView (at View.js:34)
in View (at DatePickerModal.tsx:97)

@RichardLindhout
Copy link
Member

RichardLindhout commented Mar 4, 2021 via email

@arwysyah
Copy link
Author

arwysyah commented Mar 5, 2021

No , i didnt use it, but my DatePicker modal with “range” mode running correctly, i tried use use “single” mode too but got that errors

@RichardLindhout
Copy link
Member

Did you change startDate and endDate to date=?

@arwysyah
Copy link
Author

arwysyah commented Mar 5, 2021

Yeah i did , i just copy paste from the documentation ,and i just changed a bit about color on the package and i think there is no impact cause of it because the multiple picker keep running well, and i was installing format js to support the package ,but still cannot solve it. I still getting the same error

@RichardLindhout
Copy link
Member

Can you provide your code?

@RichardLindhout RichardLindhout added the question Further information is requested label Mar 6, 2021
@arwysyah
Copy link
Author

arwysyah commented Mar 6, 2021

Hey, i am very sorry i already removed the code because i need to develop my app quickly , but yeah i just copy paste all code from documentation , didnt change anything thats written on that cause i am using typescript too for my app. But i didnt use format js at the first time and the packagas for date piker”range” and thats running well, except calendar and “single picker”,after that I tried install format js with another packages thats existing on the documentation,but i keep getting the same error, but on my code i already installed dayjs for handling date format , but i dont know if it will impacting another format on the code or not,i am sure it would not because secondGetfullyear are a function that exists on Javascript

@RichardLindhout
Copy link
Member

No problem I get it.

Ah I think you provided your dateJS object as startDate/endDate or date but you need to provide a Javascript Date object to the library.

https://day.js.org/docs/en/display/as-javascript-date

so .toDate() on the object would have worked.

@arwysyah
Copy link
Author

arwysyah commented Mar 6, 2021

But i didnt use it as state (with dayjs) and i havent use day js to convert the value from the package , so thats what said i m not sure that will impact another code or not because i installed dayjs. But thank you 👍

@RichardLindhout
Copy link
Member

Please answer here if you have the same issue as described by @arwysyah and I'll reopen the issue. Please also describe on which platforms it is (web/ios/android)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Can't reproduce question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants