{"action":"created","issue":{"url":"https://api.github.com/repos/patchthecode/JTAppleCalendar/issues/143","repository_url":"https://api.github.com/repos/patchthecode/JTAppleCalendar","labels_url":"https://api.github.com/repos/patchthecode/JTAppleCalendar/issues/143/labels{/name}","comments_url":"https://api.github.com/repos/patchthecode/JTAppleCalendar/issues/143/comments","events_url":"https://api.github.com/repos/patchthecode/JTAppleCalendar/issues/143/events","html_url":"https://github.com/patchthecode/JTAppleCalendar/issues/143","id":177438632,"number":143,"title":"Repeated week between two months with one row calendar","user":{"login":"allemattio","id":2228264,"avatar_url":"https://avatars.githubusercontent.com/u/2228264?v=3","gravatar_id":"","url":"https://api.github.com/users/allemattio","html_url":"https://github.com/allemattio","followers_url":"https://api.github.com/users/allemattio/followers","following_url":"https://api.github.com/users/allemattio/following{/other_user}","gists_url":"https://api.github.com/users/allemattio/gists{/gist_id}","starred_url":"https://api.github.com/users/allemattio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allemattio/subscriptions","organizations_url":"https://api.github.com/users/allemattio/orgs","repos_url":"https://api.github.com/users/allemattio/repos","events_url":"https://api.github.com/users/allemattio/events{/privacy}","received_events_url":"https://api.github.com/users/allemattio/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/patchthecode/JTAppleCalendar/labels/Already%20Fixed%20on%20Master%20Branch","name":"Already Fixed on Master Branch","color":"0e8a16"},{"url":"https://api.github.com/repos/patchthecode/JTAppleCalendar/labels/duplicate","name":"duplicate","color":"cccccc"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":30,"created_at":"2016-09-16T14:25:04Z","updated_at":"2016-09-21T08:39:39Z","closed_at":"2016-09-19T16:19:09Z","body":"Hi @patchthecode \r\nI'm using your calendar in one row mode to have a week view.\r\nI have a strange behaviour and I don't know if it's a bug or a misconfiguration problem.\r\nHere's the thing, suppose that I'm in this situation, with a week between two months:\r\n![img_0068](https://cloud.githubusercontent.com/assets/2228264/18588870/89c19678-7c28-11e6-924d-93e70fcd64ae.PNG)\r\n\r\nIf I scroll left, I would like to see the week from august 22nd to august 28th, but Instead I find another time this:\r\n![img_0069](https://cloud.githubusercontent.com/assets/2228264/18588906/a98d4740-7c28-11e6-82eb-a258f88f6121.PNG)\r\n\r\nAnd then, if I scroll again left I find this\r\n![img_0070](https://cloud.githubusercontent.com/assets/2228264/18588917/b318c410-7c28-11e6-8c01-ae52e31ff358.PNG)\r\n\r\nAnd scrolling again to the left I finally find the week from august 22nd to august 28th\r\nI use dark gray in the day names for current month names and light gray for other months' day.\r\nIt's like there is an extra and useless week between two months.\r\nThis happens every time when I'm scrolling from a month to another. \r\n\r\nHere is the initialization code:\r\n```swift\r\ncalendarView.dataSource = self\r\ncalendarView.delegate = self\r\ncalendarView.registerCellViewXib(fileName: cellXibName)\r\ncalendarView.cellInset = CGPoint(x: 0, y: 0)\r\ncalendarView.firstDayOfWeek = .Monday\r\ncalendarView.reloadData()\r\ncalendarView.selectDates([NSDate()])\r\ncalendarView.scrollToDate(NSDate(), triggerScrollToDateDelegate: false, animateScroll: false, preferredScrollPosition: .None, completionHandler: nil)\r\n```\r\n\r\nand here is the configureCalendar Method from the delegate\r\n\r\n```swift\r\nfunc configureCalendar(calendar: JTAppleCalendarView) -> (startDate: NSDate, endDate: NSDate, numberOfRows: Int, calendar: NSCalendar) {\r\n    var numberOfRows = 6\r\n    if let calendarView = calendar as? AddictionJTAppleCalendarView{\r\n        numberOfRows = calendarView.configuredNumberOfRows\r\n    }\r\n    let aCalendar = NSCalendar.currentCalendar()\r\n    return (startDate: CalendarDateManager.sharedInstance.calendarStartDate, endDate: CalendarDateManager.sharedInstance.calendarEndDate, numberOfRows: numberOfRows, calendar: aCalendar)\r\n}\r\n```\r\n\r\nAm I doing something wrong or is a bug?\r\nThanks in advance, and CONGRATULATIONS, this is by far the best calendar plugin, thank you so much for having developed it!!!!\r\n"},"comment":{"url":"https://api.github.com/repos/patchthecode/JTAppleCalendar/issues/comments/248548025","html_url":"https://github.com/patchthecode/JTAppleCalendar/issues/143#issuecomment-248548025","issue_url":"https://api.github.com/repos/patchthecode/JTAppleCalendar/issues/143","id":248548025,"user":{"login":"allemattio","id":2228264,"avatar_url":"https://avatars.githubusercontent.com/u/2228264?v=3","gravatar_id":"","url":"https://api.github.com/users/allemattio","html_url":"https://github.com/allemattio","followers_url":"https://api.github.com/users/allemattio/followers","following_url":"https://api.github.com/users/allemattio/following{/other_user}","gists_url":"https://api.github.com/users/allemattio/gists{/gist_id}","starred_url":"https://api.github.com/users/allemattio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allemattio/subscriptions","organizations_url":"https://api.github.com/users/allemattio/orgs","repos_url":"https://api.github.com/users/allemattio/repos","events_url":"https://api.github.com/users/allemattio/events{/privacy}","received_events_url":"https://api.github.com/users/allemattio/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T08:39:39Z","updated_at":"2016-09-21T08:39:39Z","body":"no, no headers.\r\n\r\n\r\nhere is the code called in the viewDidLoad\r\n\r\n\r\n` \r\n        calendarView.addWarrantBorder()\r\n\r\n        calendarView.dataSource = self\r\n        calendarView.delegate = self\r\n        calendarView.registerCellViewXib(fileName: cellXibName)\r\n        calendarView.cellInset = CGPoint(x: 0, y: 0)\r\n        calendarView.reloadData()\r\n        calendarView.selectDates([Date()])\r\n        calendarView.scrollToDate(Date(), triggerScrollToDateDelegate: false, animateScroll: false, preferredScrollPosition: .none, completionHandler: nil)`\r\n\r\n"}}
{"actor":{"display_login":"allemattio"}}