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

scroll_to specific date on update #503

Open
benjivm opened this issue Jan 23, 2025 · 2 comments
Open

scroll_to specific date on update #503

benjivm opened this issue Jan 23, 2025 · 2 comments

Comments

@benjivm
Copy link

benjivm commented Jan 23, 2025

Hey there, this is a great lib, thanks for it. I am attempting to do something like the following:

function onScrollToDate(date) {
    gantt.update_options({
        scroll_to: date,
    });
}

Where date is a string formatted like 2025-01-01, a date within the chart's date range. However, this is not scrolling to the date specified, is this expected?

I am using this library in a Vue component, and have tried using different instantiation method with no luck.

@safwansamsudeen
Copy link
Collaborator

Hi,

Could you share a video of your problem? This doesn't happen for me?

Are you sure your date format is set correctly?

@whernebrink
Copy link

@safwansamsudeen This might be related; when I have initial_padding set to true and scroll_to to e.g. today (or anything really, date string whatnot), it is not scrolling to that place (on init). Turning initial_padding off makes it scroll to today.

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

3 participants