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

Uncaught TypeError: $today is null #413

Closed
senti-mark-monteiro opened this issue Aug 6, 2024 · 4 comments
Closed

Uncaught TypeError: $today is null #413

senti-mark-monteiro opened this issue Aug 6, 2024 · 4 comments

Comments

@senti-mark-monteiro
Copy link

I'm using the library from the latest commit on the master branch. I get the following error when using, or switching to, the day, week, month, or year view:

Uncaught TypeError: $today is null
    make_grid_highlights https://n-hqps3kizwvk2rlnpu72bojagq2qddn5zqadf6cq-0lu-script.googleusercontent.com/userCodeAppPanel:15945
    make_grid_extras https://n-hqps3kizwvk2rlnpu72bojagq2qddn5zqadf6cq-0lu-script.googleusercontent.com/userCodeAppPanel:15742
    render https://n-hqps3kizwvk2rlnpu72bojagq2qddn5zqadf6cq-0lu-script.googleusercontent.com/userCodeAppPanel:15715
    change_view_mode https://n-hqps3kizwvk2rlnpu72bojagq2qddn5zqadf6cq-0lu-script.googleusercontent.com/userCodeAppPanel:15630
    make_side_header https://n-hqps3kizwvk2rlnpu72bojagq2qddn5zqadf6cq-0lu-script.googleusercontent.com/userCodeAppPanel:15819
userCodeAppPanel:15945:13

The offending code is here. It's not clear to me what element this line of code is attempting to find

let $today = document.getElementById(date_utils.format(date).replaceAll(' ', '_'))
@senti-mark-monteiro
Copy link
Author

Upon further consideration I have realized what is causing this error. This will happen when rendering the Gantt chart for historical or future data, and the current date is not included in the timeline at the top of the chart.

I will try to put together a PR to fix this

@Klaus-Valse
Copy link

Wait I think you duplicated my issue that I posted right before (#412). Maybe my documentation helps.

@mark-monteiro
Copy link

Ah yeah, looks like we opened duplicate issues. My PR #414 will fix both issues

@safwansamsudeen
Copy link
Collaborator

Thanks for calling this out, and apologies for the delay in fixing it!

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

Successfully merging a pull request may close this issue.

4 participants