-
Notifications
You must be signed in to change notification settings - Fork 812
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
Does 1 row calendar view sometimes skips days? #12
Comments
If you are changing the calendarView.numberOfRowsPerMonth = 1
calendarView.reloadData() or so
|
Checking to see when your issue above occurs. |
|
I'm calling
The numbers start getting lost around March. |
[EDIT] |
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
tells you the start and end date. But it was developed with
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? |
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.
What do you want me to return? Let's say i return But the next question is, what would i return for the user who has two rows of dates?
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,
i think that it would be very confusing giving a user 30 and 19 :/ |
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.
I can do this update easily. I just hope it isnt bloat code. |
On second thought. Maybe i'm overthinking it. Having the calendar on free flowing mode with more than |
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 Also, Objective # 1 is completed.
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:
if you do cellStatusForDateAtRow(1, column:2), this will return a CellStatus for the date 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. |
Ok, sorry for the delay, I'll check it out as soon as I get to a Mac! |
Added to version 2.1.2 |
In your example, I change line 40 in ViewController.swift to:
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
in viewDidLoad. It gives me an animation when hopping to the date, which isn't ideal, but works for now.
The text was updated successfully, but these errors were encountered: