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

nowIndicator does not update after changing now #7652

Open
2 tasks done
hansthen opened this issue Apr 10, 2024 · 2 comments
Open
2 tasks done

nowIndicator does not update after changing now #7652

hansthen opened this issue Apr 10, 2024 · 2 comments

Comments

@hansthen
Copy link

Checklist

  • I've already searched through existing tickets
  • Other people will find this feature useful

Is this feature for a specific connector (React/Angular/etc)?

No connector in particular

Feature Description

We use fullcalendar to display past events together with a leaflet.timeline map object, so our users can compare their past calendar to their past locations. We'd like to add a now indicator to the calendar so the active time on the calendar matches the active time on the map object. Each time the user changes the time in the timeline, we want fullcalendar to change the now indicator to match.

However, currently, the now indicator can no longer be set after render is called on the calendar.

See https://codepen.io/hansthen/pen/KKYRYoq?editors=0010 for a very simplified code flow.

@hansthen hansthen changed the title Make the now indicator settable after rendering Make the now property settable after rendering Apr 10, 2024
@acerix acerix changed the title Make the now property settable after rendering nowIndicator does not update after changing now Apr 10, 2024
@acerix
Copy link
Member

acerix commented Apr 10, 2024

The issue seems to be that the nowIndicator doesn't update after it's rendered, I believe it's the same thing causing this issue:

#5753

As a workaround, you could force the calendar to re-render after changing now like this:

https://codepen.io/acerix/pen/PogeMgz?editors=1011

To avoid that re-render, it may work better to use a background event instead to show the current time.

@hansthen
Copy link
Author

Thanks for the suggesting to use a background event. We decided to go with this approach for now. We also noted that the nowIndicator automatically increments with the amount of time passed, which is not what we want.

iI think it would be very useful to have a settable nowIndicator for the use cases I described above.

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

No branches or pull requests

3 participants