question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

scroll to current day when Today is clicked

See original GitHub issue

When defaultView is set to timelineYear the “Today” button will simply go to the current year. It will not however scroll to the current date.

http://jsbin.com/kizenohobe/edit?js,output

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
oklivcommented, Jun 24, 2016

a workaround for those who need it now

onclick event:

$('.fc-scroller').scrollLeft(0).scrollLeft($('th[data-date="'+moment().format("YYYY-MM-DD")+'"]').last().offset().left-screen.width/2);

or if you want initial pre-scroll

window.onload = function () {
  $('.fc-scroller').scrollLeft(0).scrollLeft($('th[data-date="'+moment().format("YYYY-MM-DD")+'"]').last().offset().left-screen.width/2);
};
0reactions
ocostellocommented, Jun 1, 2021

Having this same issue with listView (it’s vertical scroll rather then L->R). Going to see if laoneo’s workaround still works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to scroll to current day after render calebdar?
I want to scroll up to the current date after the render of the calendar on listMonth view. calendar code: if ($(window).width() <...
Read more >
Mobile view- auto scroll to events when day is clicked -
Mobile view- auto scroll to events when day is clicked. Post date ... If this is possible this would be fantastic please show...
Read more >
Timeline -- Programmatically scroll to current date and time
Is there a way that I can programmatically trigger the function of component? Which is to scroll to current date and time?
Read more >
react-scroll - npm
A scroll component for React.js. Latest version: 1.8.9, last published: 13 days ago. Start using react-scroll in your project by running ...
Read more >
scrollTimeReset - Docs - FullCalendar
By default, whenever the date range changes either via the API or the end-user clicking prev/next, the scroll is reset. Set scrollTimeReset to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found