-
Notifications
You must be signed in to change notification settings - Fork 810
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
Crash on using NSDate() without a formatter for date ranges #11
Comments
Acknowledged. Taking a look |
2 things.
Ex.
Difference by a ~ second. Since you are changing the boundary, the calendar thinks you want the boundaries updated and the whole layout reloaded. Now while this is logical that the calendar thinks this, it's sort of dumb. I will make the following fix -> The calendar will only assume that the developer wants to change the date when the difference in the date is greater than 1 day-unit.
The two fixes are done. Testing now. Expect a new code push in a few hrs. In the mean time continue to use the work around. After the fix you should be able to use it like you wanted to. |
Crash on using NSDate() without a formatter for date ranges #11 Under configure calendar, if I make date ranges using NSDate(): let currentDate = NSDate() let startComponents = NSDateComponents let startDate = calendar.dateByAddingComponents(startComponents, toDate: currentDate, options: NSCalendarOptions()) let endComponents = NSDateComponents() endComponents.month = 1 let endDate = calendar.dateByAddingComponents(endComponents, toDate: currentDate, options: NSCalendarOptions()) I'm getting this error 2016-04-29 17:38:30.217 MyApp[81989:679927] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'attempt to scroll to invalid index path: <NSIndexPath: 0x7b073180> {length = 2, path = 0 - 0}'
Updated to 2.1.1 |
Yes, 2.1.1 fixes the issue. |
Under configure calendar, if I make date ranges using NSDate():
I'm getting this error
I can work around this if I use the an NSDateFormatter to convert a date into a string, and back into a date. I'm not sure if this is me or the library.
The text was updated successfully, but these errors were encountered: