We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Can the calendar become finite which starts from today's date to future dates and remove the past days
The text was updated successfully, but these errors were encountered:
Try to return nil for the "after" and "before" items if the new date is out your date range.
extension ViewController: PagingViewControllerInfiniteDataSource { func pagingViewController(_: PagingViewController, itemAfter pagingItem: PagingItem) -> PagingItem? { let calendarItem = pagingItem as! CalendarItem let endDate = // Your end date let afterDate = calendarItem.date.addingTimeInterval(86400) guard afterDate <= endDate else { return nil } return CalendarItem(date: afterDate) } func pagingViewController(_: PagingViewController, itemBefore pagingItem: PagingItem) -> PagingItem? { let calendarItem = pagingItem as! CalendarItem let startDate = // Your start date let beforeDate = calendarItem.date.addingTimeInterval(-86400) guard beforeDate => startDate else { return nil } return CalendarItem(date: beforeDate) } func pagingViewController(_: PagingViewController, viewControllerFor pagingItem: PagingItem) -> UIViewController { let calendarItem = pagingItem as! CalendarItem return CalendarViewController(date: calendarItem.date) } }
Sorry, something went wrong.
No branches or pull requests
Can the calendar become finite which starts from today's date to future dates and remove the past days
The text was updated successfully, but these errors were encountered: