In your example, I change line 40 in ViewController.swift to:
calendarView.numberOfRowsPerMonth = 1
Most of the days are properly displayed but sometimes there are gaps in days:

I haven't found a pattern in when days are skipped just yet.
My workaround right now is to call
calendarView.changeNumberOfRowsPerMonthTo(1, withFocusDate: NSDate())
calendarView.reloadData()
in viewDidLoad. It gives me an animation when hopping to the date, which isn't ideal, but works for now.
If you are changing the numberOfRowsPerMonth property, then you must do it like so
calendarView.numberOfRowsPerMonth = 1
calendarView.reloadData()
or so
calendarView.changeNumberOfRowsPerMonthTo(1, withFocusDate: myDate)
Checking to see when your issue above occurs.
I'm calling
calendarView.numberOfRowsPerMonth = 1
calendarView.reloadData()
The numbers start getting lost around March.



I think what you are seeing is the end of a month and the start of another?
[Edit]
End of March - Start of April
[EDIT]
So what you are seeing above is happening around March- April (i assume)
However, in your provided screen shot, I am seeing the header "February" ?
I think you need to configure you NSCalendar.currentCalendar() to your correct setting so that the month will correctly say "March" in your screen shot.
Yeah, thanks it's definitely the boundary dates. For a one row ticker I wouldn't want them, which I've been able to work around. Due to complexity with the single row stuff I'm trying to use, I might fall back to some sort of month view for now to accelerate development.
OK i see. If there is any upgrade you think this calendar should have, then suggest it and I will see what i can do. Should I leave this issue open for sometime still?
Ideally, when it's a one-row setup, there shouldn't be the boundary dates. Before I changed my mind, I was modeling an app based on Fantastical's week ticker. You can keep this open, as someone might be interested in this.
I could implement the features so that you can build an app just like fantistical, but i will have to see what the fantastical looks like. Currently it costs about $4 plus on the app store.. and currently, I think it costs too much :(
But if you have time maybe you can send me some animated gif screens so that I can implement the features into this control. (If you got the extra free time of course)
After thinking about it some more, and after looking at the Fantastical GIF file you provided, I have realized there has to be more that goes in to the update of the calendar.
If you have paging mode off, then the days of the week will have to scroll along with the dates when a user scrolls. Because the dates will not be properly aligned with the days of the week column.
In order to achieve the following:
Then the days of the week headers (sun, mon, tue, etc) will have to be scrollable inside of the calendarView itself, just like in the gif you have provided.

I will think about an upgrade.
I'm not going to ship it, but as an experiment I'm playing with the Fantastical ticker concept.
I've gotten the cells to display the day of week, which solves the issue (for now) for making them scrollable.
I've found that the trickiest parts of implementing this are:
the function
func calendar(calendar: JTAppleCalendarView, didScrollToDateSegmentStartingWith date: NSDate?, endingWithDate: NSDate?)
tells you the start and end date. But it was developed with pagingEnabled = true
I will make the following update
Sounds good?
Sounds great!
Ok, i need something answered (so that i dont code unnecessarily for objective # 1)
Is there any reason why you want to know which date is on the left most corner of the screen?
If i know what your intention is, then I will have a better idea on the solution.
I'll be showing information below the calendar for the date on the leftmost side.
So heres the thing. Since this control is to be used by all, i have to code to benefit all.
So lets say you have your single row of dates like so:
[29, 30, 31, 1, 2, 3, 4]
What do you want me to return? Let's say i return 29 as the leftmost date and 4 as the right most date.
This might solve your problem.
But the next question is, what would i return for the user who has two rows of dates?
[29, 30, 31, 1, 2, 3, 4]
[ 5, 6, 7, 8, 9, 10, 11]
This was my question. I have to return something that makes sense. I can't just do a solution for you and leave every one else out in the cold. So i need to know what to return for someone with more than one row of dates. Any ideas? (i'm still thinking on it as well)
Maybe it can return the visible date range: so for in that 2 row example, the NSDates of 29 and 11 would be returned.
I thought this at first, but then here is where it gets tricky,
// 1. Assume that the first section is currently visible on iPhone
First Section Second Section
[29, 30, 31, 1, 2, 3, 4] [12, 13, 14, 15, 16, 17, 18]
[ 5, 6, 7, 8, 9, 10, 11] [19, 20, 21, 22, 23, 24, 25]
// 2. Now lets say that the user scrolls one cell. The Visible screen will now look like this
[30, 31, 1, 2, 3, 4, 12]
[6, 7, 8, 9, 10, 11, 19]
i think that it would be very confusing giving a user 30 and 19 :/
I am still thinking on this. Any ideas/arguments are welcome
Ah I see... Depending on how it's implemented (I need to look), any way you could pass the whole NSDate as start and end points?
If this isn't feasible, I'll probably use some sort of class extension on my own.
I have a solution at this point in my custom code, but it's extremely ugly, fragile, embarrassing, and not robust :D. I think baked into JTCalendar, some NSDate range might be a helpful feature for other folks, we could probably use other people's input.
And hey, every thing is feasible. Its just that i want it to not be "bloated" code to solve a single problem while not accounting for the others. So from what I gather, the problem is that:
So here's a solution i can implement. I will return an array of dates for the left column. And also an array of dates for the right column.
[29, 30, 31, 1, 2, 3, 4] will return [29] and [4]
[30, 31, 1, 2, 3, 4, 5] will return [30,6, 20] and [5,19, 26]
[6, 7, 8, 9, 10, 11, 19]
[20, 21, 22, 23, 24, 25, 26]
I can do this update easily. I just hope it isnt bloat code.
Does this sound like a good idea? If it is, i will get to work on objective # 1 right away.
On second thought. Maybe i'm overthinking it. Having the calendar on free flowing mode with more than 1 row seems weird and complicated when i tried it. I can't imagine any user doing this. Free flowing single rows seems ok though. Working on a solution now.
Yeah, no one will want that 2-3 rows. 1 row is a special case in terms of the date "skipping" because of boundaries, etc.
The snap to day is working great, by the way!
Ah thanks. You can control the snapping scrolling by using the calendarView.scrollResistance property. I have updated the sample app to reflect the changes.
Also, Objective # 1 is completed.
Here is the Upgrade.
func cellStatusForDateAtRow(row: Int, column: Int) -> CellState?
By supplying the row and column, user can get information about a visible date cell.
so for instance if your visible cells look like this:
[30, 31, 1, 2, 3, 4, 5]
[6, 7, 8, 9, 10, 11, 19]
[20, 21, 22, 23, 24, 25, 26]
if you do cellStatusForDateAtRow(1, column:2), this will return a CellStatus for the date 8th.
CellStatus information includes: isSelected, text, dateBelongsTo, date, and day of the week.
Do a git pull and let me know if it works for you. If there are no bugs, i will officially do an update. Also let me know if there is any thing else needed to make JTAppleCalendar create a calendar like fantastical.
If you have anything else, close this issue and open a new one so we can talk there (cuz this thread is getting long )
Ok, sorry for the delay, I'll check it out as soon as I get to a Mac!
Added to version 2.1.2
closing issue.