JTCalendar icon indicating copy to clipboard operation
JTCalendar copied to clipboard

Not scrolling to today date.

Open NirajCapermint opened this issue 4 years ago • 1 comments

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 avatar Aug 21 '19 06:08 NirajCapermint

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])

NirajCapermint avatar Aug 21 '19 09:08 NirajCapermint