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

e.add(...).isSameOrAfter is not a function #78

Open
rsoltanzadeh opened this issue May 29, 2023 · 5 comments
Open

e.add(...).isSameOrAfter is not a function #78

rsoltanzadeh opened this issue May 29, 2023 · 5 comments

Comments

@rsoltanzadeh
Copy link

Uncaught (in promise) TypeError: e.add(...).isSameOrAfter is not a function

I've been struggling for weeks with this error. Can't figure out what's causing it. It worked fine before I migrated from barebones Vue 3 to Nuxt 3, but I don't see how that changes anything.

Thankful for any assistance.

@rsoltanzadeh
Copy link
Author

rsoltanzadeh commented Aug 8, 2023

I noticed this happens only when chart-start and chart-end differ, regardless of whether I use Date objects or string representations.

Same dates:

image

Different dates:

image

image

@Adesin-fr
Copy link

Adesin-fr commented Sep 15, 2023

I am facing this too...

Such a pity this lib seems not maintained anymore, it was very promising !

Edit : Found out this error was because moment.js package was not imported into my project !

@Trolldemorted
Copy link

Edit : Found out this error was because moment.js package was not imported into my project !

manually adding a dep to moment.js solved this for you?

@Adesin-fr
Copy link

As far as I can remember, I think so... It's been a while ;)

@fabianpnke
Copy link

Hi,
I solved the problem by importing day js together with the plugin in the file that is using the Gantt components.

import dayjs from "dayjs"
import isSameOrAfter from "dayjs/plugin/isSameOrAfter.js"
dayjs.extend(isSameOrAfter)

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

No branches or pull requests

4 participants