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

Not scrolling to today date. #384

Open
NirajCapermint opened this issue Aug 21, 2019 · 1 comment
Open

Not scrolling to today date. #384

NirajCapermint opened this issue Aug 21, 2019 · 1 comment

Comments

@NirajCapermint
Copy link

NirajCapermint commented Aug 21, 2019

I am using this library from the beginning and now I came across the issue that it doesn't scroll to today's date. It just stops to previous month's date. Anyone have this issue? Following code I have used.

`func setupJTCalendar() {
self.dayCollectionView.cellSize = 60.0
self.dayCollectionView.minimumLineSpacing = 0
self.dayCollectionView.minimumInteritemSpacing = 0
self.dayCollectionView.scrollToDate(Date())
self.dayCollectionView.selectDates([Date()])

    self.dayCollectionView.visibleDates { (info) in
        if let data =  info.monthDates.first {
            self.dayCollectionView.scrollToItem(at: data.indexPath, at: .left, animated: true)
        }
    }
}`
@NirajCapermint
Copy link
Author

Getting today's date: 2019-08-21 09:00:17 +0000
While indexPath and data are as follows:
(date: 2019-07-31 18:30:00 +0000, indexPath: [0, 4])

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

1 participant