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

Days duplicates in week mode #639

Closed
lynx56 opened this issue Nov 29, 2017 · 1 comment
Closed

Days duplicates in week mode #639

lynx56 opened this issue Nov 29, 2017 · 1 comment

Comments

@lynx56
Copy link

lynx56 commented Nov 29, 2017

Hello and thank you for great library! When I testing my app I get a problem with duplicates dates, I create new project for recreate problem and it's happened again. When I scroll from January first week, I get first week twice.
https://monosnap.com/file/68dNlQN8O1SO1Hjb4Brk8oGme2mCnM

IMPORTANT - BEFORE CREATING YOUR ISSUE PLEASE READ THE FOLLOWING:

  1. PLEASE STATE THE VERSION NUMBER you are using.
    7.1.4
  2. Are you using the latest version of JTAppleCalendar? Latest version is currently 7.1.4
    yes
  3. PROVIDE ENOUGH INPORMATION SO I CAN RECREATE THE PROBLEM.
extension ViewController: JTAppleCalendarViewDataSource{
    func configureCalendar(_ calendar: JTAppleCalendarView) -> ConfigurationParameters {
        let now = Date()
        let startDate = Calendar.current.date(byAdding: .year, value: -1, to: now)!
        let endDate = Calendar.current.date(byAdding: .year, value: 1, to: now)!
        let firstDay = DaysOfWeek(rawValue: Calendar.current.firstWeekday)
        return ConfigurationParameters(startDate: startDate, endDate: endDate, numberOfRows: 1, calendar: Calendar.current, generateInDates: nil, generateOutDates: nil, firstDayOfWeek: firstDay, hasStrictBoundaries: nil)
    }
}
extension ViewController: JTAppleCalendarViewDelegate{
    func calendar(_ calendar: JTAppleCalendarView, willDisplay cell: JTAppleCell, forItemAt date: Date, cellState: CellState, indexPath: IndexPath) {       }
    
    func calendar(_ calendar: JTAppleCalendarView, cellForItemAt date: Date, cellState: CellState, indexPath: IndexPath) -> JTAppleCell {
        let cell = calendar.dequeueReusableJTAppleCell(withReuseIdentifier: "Day", for: indexPath) as! DayCollectionViewCell
        cell.day.text = cellState.text
        self.navigationItem.title = NSLocalizedString("QuestionsTitle", comment: "Title for questions tab (Ex.: Questions(Nov.) what will be concatinated with month name") + "(\(titleFormatter.string(from: date)))"
     return cell
    }
}
@patchthecode
Copy link
Owner

#581

closing this issue.
If this didnt help, then let me know

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

2 participants