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

Provide the initial scrolled month and infinite bidirectional scrolling #222

Open
mfbx9da4 opened this issue Apr 2, 2023 · 1 comment
Open
Assignees
Labels
question Further information is requested

Comments

@mfbx9da4
Copy link

mfbx9da4 commented Apr 2, 2023

We would like to allow the user to navigate infinitely into the future and into the past. We would also likely provide an initial scrolled month. We are achieving this by doing the following

  • Set the visibleDateRange to (Now - 10 years)...(Now + 10 Years)
  • After CalendarView.init() call self.scroll(toMonthContaining: someDate, scrollPosition: .centered, animated: false)

This is not ideal because

  • We don't want to arbitrarily bound the navigation by 20 years
  • Since we are using the SwiftUI variant we have to modify the internals CalendarView.init() to achieve this initial scroll position

Do the maintainers of this project condone our current approach or would they suggest something else?

Thanks for your hard work, the performance is excellent.

@mfbx9da4 mfbx9da4 changed the title Provide the initial scrolled month with infinite bidirectional scrolling Provide the initial scrolled month and infinite bidirectional scrolling Apr 2, 2023
@bryankeller
Copy link
Contributor

@mfbx9da4 can you just add +/- a 100,000 years or something? HorizonCalendar was built to scale to that use case!

As for the SwiftUI scroll-to stuff, I'm working on support for that now!

@bryankeller bryankeller self-assigned this Apr 6, 2023
@bryankeller bryankeller added the question Further information is requested label Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants